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

tidy_emmeans handles contrasts when column names have dashes #351

merged 5 commits into from Jun 12, 2018


None yet
2 participants

bmannakee commented Jun 12, 2018

  • changed sep="-" to sep=" - " in separate_ call in tidy_emmeans
  • return a tibble from tidy_emmeans
  • add test data and test to test_lsmeans.R

Output looks like

data_frame(y = rnorm(100), x = rep(c("Single", "Double-Barrelled"), 50)) %>% 
  lm(y ~ x, data = .) %>% lsmeans::lsmeans(., ~x) %>% lsmeans::contrast(., 
  "pairwise") %>% tidy %>% print()
#> # A tibble: 1 x 7
#>   level1           level2 estimate std.error    df statistic p.value
#> * <chr>            <chr>     <dbl>     <dbl> <dbl>     <dbl>   <dbl>
#> 1 Double-Barrelled Single   0.0617     0.187    98     0.329   0.743

@alexpghayes alexpghayes merged commit ad158e4 into tidymodels:master Jun 12, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
continuous-integration/appveyor/pr AppVeyor build succeeded

This comment has been minimized.


alexpghayes commented Jun 12, 2018

Spectacular! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment