Create a named vector using the values from one column in the second.
Usage
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
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.