Description Usage Arguments Value
View source: R/as.data.frame_named.vector.R
converts a named vector to a 2 column data frame with the names in the first column and values in the second columns. Throws an error if no names are found. Row names are stripped out of the final data frame.
1 | as.data.frame_named.vector(x, valname = deparse(substitute(x)))
|
x |
a named vector |
valname |
a character string to be used as the new column name. Defaults to the name of x |
a two column data frame with nrow = length(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.