Skip to content
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

Adapt to tidyr v1.0.0 #196

Merged
merged 1 commit into from
Aug 1, 2019
Merged

Adapt to tidyr v1.0.0 #196

merged 1 commit into from
Aug 1, 2019

Conversation

jennybc
Copy link
Contributor

@jennybc jennybc commented Aug 1, 2019

Closes #195

As mentioned in #195, the root issue here is that tidyr::nest() now returns a grouped object, which has implications for downstream manipulations via, e.g., dplyr.

data,
test.func, formula = formula,
method = method, paired = paired, p.adjust.method = "none",...)
) %>%
Copy link
Contributor Author

@jennybc jennybc Aug 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this map() inside the mutate(), instead of outside, makes this code work for CRAN and dev versions of tidyr.

@@ -233,6 +236,7 @@ compare_means <- function(formula, data, method = "wilcox.test",
by_y <- res %>% group_by(.y.)
pvalue.adj <- do(by_y, .p.adjust(., method = p.adjust.method))
res <- res %>%
dplyr::ungroup() %>%
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An explicit ungroup() here makes the code work for CRAN and dev versions of tidyr.

@kassambara
Copy link
Owner

Thank you @jennybc for this contribution, highly appreciated!

@kassambara kassambara merged commit 28d9870 into kassambara:master Aug 1, 2019
@jennybc
Copy link
Contributor Author

jennybc commented Aug 2, 2019

Great! So can you do a small release of ggpubr, in the near future?

@kassambara
Copy link
Owner

ggpubr is submitted now to CRAN

@jennybc
Copy link
Contributor Author

jennybc commented Aug 3, 2019

Excellent! Thanks for doing attending to this in such a timely manner.

@kassambara
Copy link
Owner

You are welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

group.by gives error: Column p must be length 1 (the group size)
2 participants