df <- data.frame(v1 = letters[1:5], v2 = 1:5)
df
# By default, it creates new groups
grp_routine(df, "group",
first = v1 %in% c("a", "b"),
second = v2 == 3,
third = v2 >= 4)
# Gives a warning when the groups are not collectively exhaustive
grp_routine(df, "group",
first = v1 %in% c("a", "b"),
second = v2 == 3,
third = v2 > 4)
# SE version
grp_routine_(df, "group",
"first" = ~ v1 %in% c("a", "b"),
"second" = ~ v2 == 3,
.dots = setNames(list(~ v2 > 4), "third"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.