Description Usage Arguments Details Value
Reshape data frames from wide to long format.
1 2 3 |
data |
A data frame in wide format. |
varying.list |
A named list of character vectors. Each vector of this
list will contain the names of the variables in |
idvar |
Name of the variable in |
ids |
Values to use for a newly created |
within.name |
Character string with the name of the within-subjects factor, that will be created in long format for differentiating multiple records from the same individual. |
within.levels |
What will be the levels of the within-subjects factor (see Details). |
drop |
Variables of |
This is a wrapper of stats::reshape
with direction="long"
.
It admits duplicated values in idvar
, and the default values of
ids
and times
are different. The argument times
of
reshape
is defined according to the value of within.levels
:
"colnames"
means that times
will be the names of the first set of
variables defined in varying.list
; for "integers"
, they will be a
sequence of integers (as the default value in reshape
); for "letters"
they will be an alphabetical list starting from "a"
(limited to 26 levels).
Reshaped data frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.