collapse_rows | R Documentation |
Collapse rows of a dataframe
collapse_rows(data, cols, to = NA)
data |
a dataframe |
cols |
character vector with columns to collapse |
to |
value to put. Default to 'NA' |
a dataframe
dt <- data.frame(a = c(1, 1, 2, 2), b = c("a", "a", "a", "b"))
collapse_rows(dt, "a", to = "")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.