Learn R Programming

tmap (version 0.6)

append_data: Append data

Description

Append data.frame to shape object

Usage

append_data(shp, data, key.data = NULL, key.shp = NULL,
  ignore.duplicates = FALSE, fixed.order = is.null(key.data) &&
  is.null(key.shp))

Arguments

shp
shape object
data
data.frame
key.data
variable name of data to be matched with key.shp. If not specified, and fixed.order is FALSE, the row names of data are taken.
key.shp
variable name of shp map data to be matched with key.data. If not specified, and fixed.order is FALSE, the polygon ID's are taken.
ignore.duplicates
should duplicated keys in data be ignored? (FALSE by default)
fixed.order
should the data be append in the same order as the shapes in shp?

Value

  • shape object with appended data