This is a convenience function
that allows grouping of a data frame by all variables (columns)
except those variables specified in ...
.
group_by_everything_except(.DF, ..., .add = FALSE, .drop = FALSE)
.DF | a data frame to be grouped |
---|---|
... | a string, strings, vector of strings, or list of strings representing column names to be excluded from grouping |
.add | When |
.drop | When |
a grouped version of .DF
library(dplyr) DF <- data.frame(a = c(1, 2), b = c(3, 4), c = c(5, 6)) group_by_everything_except(DF) %>% group_vars()#> [1] "a" "b" "c"#> [1] "a" "b" "c"#> [1] "a" "b" "c"#> [1] "a" "b" "c"#> [1] "a" "b" "c"#> [1] "b" "c"#> [1] "a" "b"#> [1] "b"#> [1] "b" "c"#> [1] "b" "c"