v2df | R Documentation |
Convert a named vector into a data.frame
Turn a one-row table into a data frame
v2df(vec, variable_name = "variable", value_name = "value") t2df(table, variable_name = "variable", value_name = "value")
vec |
A named vector |
variable_name |
variable_name |
value_name |
value_name |
table |
a frequency table (i.e. only one row) |
Kevin Wang
x = 1:5 names(x) = letters[1:5] v2df(x) x = table(sample(letters[1:5], 100, replace = TRUE)) t2df(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.