subsetSDF.SpatialIndexDataFrame: Subsetting objects of class SpatialIndexDataFrame

Description Usage Arguments Value Author(s) Examples

View source: R/subsetSDF.R

Description

Subsetting of objects of class SpatialIndexDataFrame: selects index and/or attribute(s), and returns an object of class SpatialIndexDataFrame.

Usage

1
2

Arguments

x

object of class SpatialIndexDataFrame

locations

integer vector: keep data where x@index has this value (multiplicity ignored, order taken into account)

data

integer vector or names of columns of the x@data to be kept (order and multiplicity ignored)

...

further arguments to be passed to other methods

grid

integer vector: indices of x@index, keep the corresponding data

Value

A SpatialIndexDataFrame; the subsetting can be done cumulatively, e.g. if grid and locations is given, only the index entries that fullfill both criteria are kept.

Author(s)

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

Examples

1
2
3
4
5
data(SIndexDF)
# subset
SIndexDF1 = subsetSDF(SIndexDF, grid = which(SIndexDF@index == 1)) 
SIndexDF2 = subsetSDF(SIndexDF, locations = 1) # identical to x_1
SIndexDF3 = subsetSDF(SIndexDF, grid = c(2:4, 6:8, 10:12, 14:16, 18:20), data = "c")

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