extractSpatialDataFrame: Extract some values of Simulations to a SpatialDataFrame with...

Description Usage Arguments Details Value Author(s) Examples

View source: R/extractSpatialDataFrame.R

Description

Turn some of the values of a Simulations object into a SpatialDataFrame, keeping the spatial reference.

Usage

1
2
extractSpatialDataFrame(obj, kinds = 1:nlayers(obj@values),
  plumes = 1:ncol(obj@values), chunksize = 1e+7)

Arguments

obj

Simulations object

kinds

integer: values of which layers (kind) of the values to extract

plumes

integer: values of which plume to extract

chunksize

limit of cells to extract, if selected kinds and plumes exceed this limit, only the first are extracted (with warning)

Details

This function can be used to extract the maps in Simulations objects: the values are assigned to the spatial properties, for plotting, combining it with other spatial data etc. As the size of all values may exceed the memory, it may extract only the first of the kinds and plumes.

Value

A SpatialDataFrame with the same spatial reference as the locations of the obj with the values of the chosen plume and layer as attribute.

Author(s)

Kristina B. Helle, kristina.helle@uni-muenster.de

Examples

1
2
3
4
data(SimulationsSmall)
SimulationsSmall_134_21 = extractSpatialDataFrame(
  SimulationsSmall,
  plumes = c(1,3,4), kinds = c(2,1))

sensors4plumes documentation built on May 1, 2019, 10:27 p.m.