View source: R/internal-expected_vars.R
expected_groups | R Documentation |
Given a data frame and a set of discrete (or factor) variables, returns all combinations of their observed levels and the list of levels.
expected_groups(data, vars)
data |
A data frame whose columns you want to examine. |
vars |
Character vector of column names in |
A named list with two elements:
A data.frame where each row is one combination of the variable levels
(equivalent to what expand.grid
would produce).
A named list; for each variable in vars
it gives the sorted
unique values (or factor levels) observed in data
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.