Learn R Programming

toro (version 0.1.0)

get_column_group: Get the values for a paint or layout option in a map layer based on a column value

Description

Allows the data to be styled by the group option in the column.

Usage

get_column_group(column_name, named_group_values, default_value = "#cccccc")

Value

List containing the paint or layout option to be set.

Arguments

column_name

String representing the name of the column to be used.

named_group_values

Vector of value strings named by the group values. The names of the vector should match the group values in the column.

default_value

String for the default value to use if no match is found. Default is "#cccccc".

Examples

Run this code
get_column_group("group", c("A" = "red", "B" = "blue"), "grey")
get_column_group("opacity", stats::setNames(c(0.3, 0.5), c("A", "B")), 0.6)

Run the code above in your browser using DataLab