You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the direction argument to get_p_value() supports "two-sided", "two_sided", and "two sided". Since "two.sided" is familiar to users of the base-R tests (t.test(), etc.), it seems like a useful alternative.
Here's a reproducible example.
library(infer)
null_distn<-gss %>%
specify(response=hours) %>%
hypothesize(null="point", mu=40) %>%
generate(reps=1000, type="bootstrap") %>%
calculate(stat="mean")
point_estimate<-gss %>%
specify(response=hours) %>%
calculate(stat="mean")
get_p_value(null_distn, point_estimate, direction="two.sided")
#> Error: The provided value for `direction` is not appropriate. Possible values are "less", "greater", "two-sided", "left", "right", "both", "two_sided", or "two sided"
Rather than throwing an error, I want direction = "two.sided" to be treated the same as direction = "two-sided".
This issue 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.
Currently, the
direction
argument toget_p_value()
supports"two-sided"
,"two_sided"
, and"two sided"
. Since"two.sided"
is familiar to users of the base-R tests (t.test()
, etc.), it seems like a useful alternative.Here's a reproducible example.
Rather than throwing an error, I want
direction = "two.sided"
to be treated the same asdirection = "two-sided"
.The logic for checking the direction is here: https://github.com/tidymodels/infer/blob/master/R/utils.R#L408-L410
The text was updated successfully, but these errors were encountered: