mat_head_group | R Documentation |
Take first groups
mat_head_group(df, ..., n_head = 5, slice = FALSE)
df |
data |
... |
grouping vars |
n_head |
Number of groups |
slice |
Whether |
df <- data.frame(group_a = rep(LETTERS[1:3], each=4),
group_b = rep(letters[1:2], 6),dat = 1:12)
mat_head_group(df, group_a, n_head=1)
mat_head_group(df, group_a, group_b, n_head=1)
## Use as slice: select second group only, not up to 2:
mat_head_group(df, group_a, n_head=2, slice=TRUE)
mat_head_group(df, group_a, n_head=c(2,3), slice=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.