named_vector: Create a named vector using the values from one column in the...

Description Usage Arguments Value

Description

The levels of 'a' are used to pick the corresponding values in 'b' so that the named vector returned can be used in e.g. ggplot2::scale label parameters.

Usage

1
named_vector(.df, a, b)

Arguments

.df

the dataframe to reference the columns from

a

the column whose levels will be used as names

b

the values of the named vector

Value

a named vector


eclarke/eclectic documentation built on May 15, 2019, 7:54 p.m.