| tolong | R Documentation |
Reshape columns into key/value rows
tolong(
data,
cols,
names = "variable",
values = "value",
idcols = NULL,
na.rm = FALSE
)
data |
A data.frame. |
cols |
Character vector of column names. |
names |
Name for the resulting key/value column, depending on the function. |
values |
Vector or list of replacement values. |
idcols |
Columns to keep as row identifiers. |
na.rm |
Drop missing values before computing the result. |
A long-format basetable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.