attach_key: Attach a key

View source: R/attach_key.R

attach_keyR Documentation

Attach a key

Description

This function attaches a bivariate colour key to a bivariate colour map or a glyph key to a glyph map so that they can be viewed together.

Usage

attach_key(map, mapkey)

Arguments

map

An object generated with build_bmap or build_gmap.

mapkey

An object generated with build_bkey or build_gkey.

Examples

data(us_data)
data(us_geo)
poverty <- read.uv(data = us_data, estimate = "pov_rate", error = "pov_moe")

# bivariate map and key together
map <- build_bmap(data = poverty, geoData = us_geo, id = "GEO_ID",
 border = "state", terciles = TRUE)
key <- build_bkey(data = poverty, terciles = TRUE)
attach_key(map, key)

pkuhnert/VizU documentation built on March 19, 2024, 10:51 p.m.