gb_sm: Group by and summarize

Description Usage Arguments Value Examples

Description

This is only a shortcut for df then group_by(...) and then summarize(...)

Usage

1

Arguments

data

A data frame

...

A list of variable (no characters) used in a group_by

Value

A dplyr::data_frame object with the counts and percets of each combination of ....

Examples

1
2
3
4
5
6
set.seed(1313)
x <- sample(LETTERS[1:4], size = 100, prob = 1:4/4, replace = TRUE)
X <- sample(letters[1:2], size = 100, prob = 1:2/2, replace = TRUE)
data <- data.frame(class = x, class2 = X)
gb_sm(data, class)
gb_sm(data, class, class2)

jbkunst/riskr documentation built on May 18, 2019, 7 p.m.