cols_to_map | R Documentation |
Generates a named list based on two columns from a data frame.
cols_to_map(dataframe, key, value)
dataframe |
A data frame |
key |
A string of a column name in the data frame |
value |
A string of a column name in the data frame |
A named list, with the names from the key field and values from the value field
cols_to_map(mtcars, key = "cyl", value = "mpg")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.