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
Describe the bug
I am unable to use tidyverse group_by and then pass data to corr.test and generate a report.
Error in match.arg(alternative) :
'arg' must be NULL or a character vector
To Reproduce
Steps to reproduce the behaviour:
Here is the bug reproduced with the iris dataset:
iris %>%
group_by(Species) %>%
cor.test(iris$Sepal.Length, iris$Sepal.Width) %>%
report() %>%
as.data.frame()
cor.test() doesn't support grouped data frames. You would need to use a workflow that splits the data into separate frames by Species, such as with split() and lapply(). Or easier, use the correlation::correlation() function, which does support grouped data frames.
Describe the bug
I am unable to use tidyverse group_by and then pass data to corr.test and generate a report.
Error in match.arg(alternative) :
'arg' must be NULL or a character vector
To Reproduce
Steps to reproduce the behaviour:
Here is the bug reproduced with the iris dataset:
iris %>%
group_by(Species) %>%
cor.test(iris$Sepal.Length, iris$Sepal.Width) %>%
report() %>%
as.data.frame()
Expected behaviour
Pearson's product-moment correlation
Parameter1 | Parameter2 | r | 95% CI | t(148) | p
iris$Sepal.Length | iris$Sepal.Width | -0.12 | [-0.27, 0.04] | -1.44 | 0.152
Alternative hypothesis: two.sided
BUT per Species
Screenshots
Specifications (please complete the following information):
packageVersion("rstatix")
[1] ‘0.7.2’
packageVersion("stats")
[1] ‘4.2.2’
packageVersion("easystats")
[1] ‘0.7.1’
packageVersion("report")
[1] ‘0.5.8’
The text was updated successfully, but these errors were encountered: