| list2df | R Documentation |
Convert list of vectors to data.frame with item, value, name
list2df(x, makeUnique = TRUE, useVectorNames = TRUE, ...)
x |
list of vectors |
makeUnique |
logical indicating whether the data.frame should contain unique rows. |
useVectorNames |
logical indicating whether vector names should be included in the data.frame, if they exist. |
... |
additional arguments are ignored. |
This function converts a list of vectors to a tall data.frame
with colnames item to indicate the list name, value to indicate
the vector value, and name to indicate the vector name if
useVectorNames=TRUE and if names exist.
data.frame with two columns, or three columns when
useVectorNames=TRUE and the input x contains names.
Other jam list functions:
cPaste(),
heads(),
jam_rapply(),
mergeAllXY(),
mixedSorts(),
rbindList(),
relist_named(),
rlengths(),
sclass(),
sdim(),
uniques(),
unnestList()
list2df(list(lower=head(letters, 5), UPPER=head(LETTERS, 10)))
list2df(list(lower=nameVector(head(letters, 5)),
UPPER=nameVector(head(LETTERS, 10))))
list2df(list(lower=nameVector(head(letters, 5)),
UPPER=nameVector(head(LETTERS, 10))),
useVectorNames=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.