wide2long | R Documentation |
Convert data from wide to long format
wide2long(
data,
within_factors = c(),
within_cols = c(),
dv = "y",
id = "id",
sep = faux_options("sep")
)
data |
the tbl in wide format |
within_factors |
the names of the within factors |
within_cols |
the names (or indices) of the within-subject (value) columns |
dv |
the name of the dv column (defaults to "y") |
id |
the name of the ID column(s) if they don't exist, a new column will be made (defaults to ("id") |
sep |
separator for within-columns (to be used in strsplit, so can be regex), defaults to "_" |
a tbl in long format
wide2long(iris, c("Feature", "Measure"), 1:4, sep = "\\.")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.