View source: R/namedVectorFromColumns.R
namedVectorFromColumns | R Documentation |
Create Named Vector from two Columns of a Data Frame
namedVectorFromColumns(data, valueColumn, nameColumn)
data |
a data frame |
valueColumn |
name of column in |
nameColumn |
name of column in |
vector with values in data[[valueColumn]]
, named by
data[[nameColumn]]
data <- data.frame(a = 1:3, name = LETTERS[1:3])
namedVectorFromColumns(data, valueColumn = "a", nameColumn = "name")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.