df.2.named.vector: Data frame to named vector

Description Usage Arguments Value Examples

View source: R/df.2.named.vector.R

Description

Turns the two first columns of a data frame into a named vector, taking the values from the second and the names from the first column.

Usage

1

Arguments

.data

a data frame with at least two columns

Value

a named vector

Examples

1
2
3
data <- data.frame(names = c("one", "two", "three"), values = 1:3)
data
df.2.names.vector(data)

michaja/quitte documentation built on May 22, 2019, 9:53 p.m.