-
Notifications
You must be signed in to change notification settings - Fork 50
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
games_howell_test under rstatix in R is not working #183
Comments
Reprex: library(rstatix)
#>
#> Attaching package: 'rstatix'
#> The following object is masked from 'package:stats':
#>
#> filter
df <- structure(list(Genotype = structure(c(1L, 1L, 1L, 1L, 2L, 2L,
2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 6L, 6L,
6L, 6L), levels = c("Geno1", "Geno2", "Geno3", "Geno4", "Geno5",
"Geno6"), class = "factor"), Tillering = c(22L, 23L, 23L, 23L,
22L, 22L, 22L, 22L, 23L, 22L, 23L, 23L, 23L, 23L, 23L, 23L, 21L,
21L, 20L, 21L, 22L, 22L, 22L, 22L)), row.names = c(NA, -24L),
class = "data.frame")
games_howell_test(df, Tillering~Genotype, detailed = TRUE)
#> Error in `mutate()`:
#> ℹ In argument: `data = map(.data$data, .f, ...)`.
#> Caused by error in `map()`:
#> ℹ In index: 1.
#> Caused by error in `mutate()`:
#> ℹ In argument: `df = df$value`.
#> Caused by error:
#> ! `df` must be size 15 or 1, not 12.
#> Backtrace:
#> ▆
#> 1. ├─rstatix::games_howell_test(df, Tillering ~ Genotype, detailed = TRUE)
#> 2. │ └─data %>% doo(.games_howell_test, formula, conf.level = conf.level)
#> 3. ├─rstatix::doo(., .games_howell_test, formula, conf.level = conf.level)
#> 4. │ └─... %>% mutate(data = map(.data$data, .f, ...))
#> 5. ├─dplyr::mutate(., data = map(.data$data, .f, ...))
#> 6. ├─dplyr:::mutate.data.frame(., data = map(.data$data, .f, ...))
#> 7. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
#> 8. │ ├─base::withCallingHandlers(...)
#> 9. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
#> 10. │ └─mask$eval_all_mutate(quo)
#> 11. │ └─dplyr (local) eval()
#> 12. ├─purrr::map(.data$data, .f, ...)
#> 13. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
#> 14. │ ├─purrr:::with_indexed_errors(...)
#> 15. │ │ └─base::withCallingHandlers(...)
#> 16. │ ├─purrr:::call_with_cleanup(...)
#> 17. │ └─rstatix (local) .f(.x[[i]], ...)
#> 18. │ └─... %>% mutate(method = "Games-Howell")
#> 19. ├─dplyr::mutate(., method = "Games-Howell")
#> 20. ├─rstatix::add_significance(., "p.adj")
#> 21. │ └─rstatix:::get_test_attributes(data)
#> 22. ├─tibble::add_column(., .y. = outcome, .before = "group1")
#> 23. │ └─base::is.data.frame(.data)
#> 24. ├─tibble::add_column(., n1 = n1, n2 = n2, .after = "group2")
#> 25. │ └─base::is.data.frame(.data)
#> 26. ├─dplyr::mutate(...)
#> 27. ├─dplyr:::mutate.data.frame(...)
#> 28. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
#> 29. │ ├─base::withCallingHandlers(...)
#> 30. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
#> 31. │ └─mask$eval_all_mutate(quo)
#> 32. │ └─dplyr (local) eval()
#> 33. ├─dplyr:::dplyr_internal_error(...)
#> 34. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
#> 35. │ └─rlang:::signal_abort(cnd, .file)
#> 36. │ └─base::signalCondition(cnd)
#> 37. └─dplyr (local) `<fn>`(`<dpl:::__>`)
#> 38. └─rlang::abort(message, class = error_class, parent = parent, call = error_call) Created on 2023-05-15 with reprex v2.0.2 Might this be related to the fact that some groups have zero variance? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I raised this question in https://stackoverflow.com/questions/75546541/problems-with-games-howell-test-in-r-or-df-must-be-size-15-or-1-not-12. People suggested it could be a bug. Please could you look at it. Thanks.
The link is also copied below:
https://stackoverflow.com/questions/75546541/problems-with-games-howell-test-in-r-or-df-must-be-size-15-or-1-not-12
The text was updated successfully, but these errors were encountered: