reshape.long | R Documentation |
Long format duplicates certain columns and adds rows for which one new column hold values coming from a set of columns in wide format. Does not allow for parallel reshaping.
reshape.long( d, vars = NULL, factorColumn = "factor", valueColumn = "value", factors = as.factor(vars), rowNamesAs = NULL )
d |
data frame with columns in wide format |
vars |
columns in wide format by name or index |
factorColumn |
name of the column to be created for the factor |
valueColumn |
name of the new column of values that were in wide format |
factors |
|
rowNamesAs |
name of the column that should contain row names |
data frame in long format
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.