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

Address new group_by %>% summarize warning message #353

Open
rudeboybert opened this issue Jun 8, 2020 · 0 comments
Open

Address new group_by %>% summarize warning message #353

rudeboybert opened this issue Jun 8, 2020 · 0 comments
Assignees
Labels
v2 Second edition

Comments

@rudeboybert
Copy link
Member

rudeboybert commented Jun 8, 2020

As noted on StackOverflow, as of dplyr v1.0.0 (I think), when running group_by() %>% summarize(), a message is now outputted (see reprex below):

`summarise()` ungrouping output (override with `.groups` argument)

This message is not addressed in the v1 print edition of the book. To keep moderndive.com consistent with the print edition, for now we set options(dplyr.summarise.inform = FALSE) in index.Rmd

For v2:

  • Remove this option()
  • Explicitly address this in the text for Ch3 Data Wrangling.

reprex:

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
library(nycflights13)

weather %>% 
  group_by(month) %>% 
  summarize(mean = mean(temp, na.rm = TRUE))
#> `summarise()` ungrouping output (override with `.groups` argument)
#> # A tibble: 12 x 2
#>    month  mean
#>    <int> <dbl>
#>  1     1  35.6
#>  2     2  34.3
#>  3     3  39.9
#>  4     4  51.7
#>  5     5  61.8
#>  6     6  72.2
#>  7     7  80.1
#>  8     8  74.5
#>  9     9  67.4
#> 10    10  60.1
#> 11    11  45.0
#> 12    12  38.4

Created on 2020-06-08 by the reprex package (v0.3.0)

@rudeboybert rudeboybert added the v2 Second edition label Jun 8, 2020
@rudeboybert rudeboybert self-assigned this Jun 8, 2020
@rudeboybert rudeboybert changed the title Address summarize() message Address new group_by %>% summarize warning message Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 Second edition
Projects
None yet
Development

No branches or pull requests

1 participant