Add colors depending on attribute value

color_by_attribute(data, group)

Arguments

data

[tibble()]
Data to modify.

group

[character(1)]
Name of a currently selected attribute (if none, empty string).

Value

A tibble with additional color column of character type.