-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix bug in prop.test()
wrapper
#502
Conversation
@@ -258,11 +258,11 @@ test_that("conf_int argument works", { | |||
}) | |||
|
|||
# generate some data to test the prop.test wrapper | |||
df <- data.frame(resp = c(rep("c", 450), | |||
df <- data.frame(exp = rep(c("a", "b"), each = 500), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adjusting each table()
call further down to tabulate the first variable as the "column," I just adjusted the order in which the variables in this dataset were defined.
|
||
# reorder according to the order and success arguments | ||
sum_table <- sum_table[lvls, order] | ||
select(explanatory_name(x), response_name(x)) %>% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not obvious to me how we could formally test which selection order is "right," though I'm quite confident it's correct now. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments, looks good to me!
Co-authored-by: Mine Cetinkaya-Rundel <[email protected]>
Seeing the same failures on |
This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
Closes #496. See that issue for discussion. :)