Transforms a matrix
to a long data.frame
.
Usage
wide_to_long(from, ...)
to_long(from, ...)
# S4 method for matrix
wide_to_long(from, factor = FALSE, reverse = FALSE)
# S4 method for matrix
to_long(from, factor = FALSE, reverse = FALSE)
Arguments
- from
An object to be coerced.
- ...
Currently not used.
- factor
A
logical
scalar: should character string be coerced tofactor
? Default toFALSE
, ifTRUE
the original ordering is preserved.- reverse
A
logical
scalar: should the order of factor levels be reversed? Only used iffactor
isTRUE
. Useful for plotting.