Description Usage Arguments Author(s) Examples
Sometimes, it is useful to have the columns of a
data.frame
as separate list items or vectors.
unlist
is useful for creating a single
vector, but not for creating multiple vectors. The
dfcols.list
function is a simple
convenience function that allows for such
transformations.
1 | dfcols.list(data, vectorize = TRUE)
|
data |
The input |
vectorize |
Logical. Should the function return a
list of single-column |
Ananda Mahto
1 2 3 | dat <- data.frame(A = c(1:2), B = c(3:4), C = c(5:6))
dfcols.list(dat)
dfcols.list(dat, vectorize = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.