Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@maurolepore
Created April 20, 2020 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maurolepore/6558292c5003a15e246a88091c307b65 to your computer and use it in GitHub Desktop.
Save maurolepore/6558292c5003a15e246a88091c307b65 to your computer and use it in GitHub Desktop.

With dplyr 0.8.5

packageVersion("dplyr")
#> [1] '0.8.5'
packageVersion("janitor")
#> [1] '2.0.1'

suppressPackageStartupMessages(library(dplyr))
janitor::clean_names(group_by(tibble(x.x = 1), x.x))
#> # A tibble: 1 x 1
#> # Groups:   x.x [1]  # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Compare
#>     x_x              # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#>   <dbl>
#> 1     1

With dplyr 1 (candidate)

packageVersion("dplyr")
#> [1] '0.8.99.9002'
packageVersion("janitor")
#> [1] '2.0.1'

suppressPackageStartupMessages(library(dplyr))
janitor::clean_names(group_by(tibble(x.x = 1), x.x))
#> # A tibble: 1 x 1
#> # Groups:   x_x [1]  # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Compare
#>     x_x              # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#>   <dbl>
#> 1     1

Created on 2020-04-20 by the reprex package (v0.3.0)

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