valence_colorer: Select appropriate colors depending on 'valence' values in...

Description Usage Arguments Value

Description

Select appropriate colors depending on 'valence' values in selection. Takes a named vector containing colours and assigns them in the correct order to factor levels from a dataframe.

Usage

1
2
valence_colorer(valence_df, valence_col = "valence",
  avc = all_valence_colors)

Arguments

valence_df

dataframe containing valence data; (truncated, arranged) output from assign_polarity.

valence_col

string, selects column with strings / factors labelling valences to derive colors from.

avc

vector, named with valences, contains strings defining colours to use for each.

Value

A named vector with avc's elements in the order matching their levels in valence_df.


IskanderBlue/morseldash documentation built on Oct. 30, 2019, 7:24 p.m.