add_shape: Add a shapefile to a 'nodiv' data object

View source: R/Methods_for_data_objects.R

add_shapeR Documentation

Add a shapefile to a nodiv data object

Description

Takes a shapefile, e.g. as points or polygons, and adds it to the data object

Usage

add_shape(distrib_data, shape)

Arguments

distrib_data

An object of type distrib_data, nodiv_data or nodiv_result

shape

A GIS shapefile, from e.g. packages maptools or rgdal

Value

Returns the object with the new shapefile

Author(s)

Michael Krabbe Borregaard

See Also

distrib_data

Examples

  # remove the shapefile from coquettes
  data(coquettes)
  sh <- coquettes$shape
  coquettes$shape <- NULL
  # and add it back in
  coquettes <- add_shape(coquettes, sh)

mkborregaard/nodiv documentation built on April 7, 2023, 9:52 a.m.