named_vector_to_df | R Documentation |
Convert a named data to a data frame
named_vector_to_df(x, name_col = "name", value_col = "value")
x |
A vector |
name_col |
The name of the variable to use for the names |
value_col |
The name of the variable to use for the values |
A data frame
named_vector_to_df(c(a = 1, b = 2))
named_vector_to_df(c(a = 1, b = 2), "x", "y")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.