stamp.multichange: run stamp function for multiple years of polygons at once

Description Usage Arguments Details Value Examples

View source: R/stamp.multichange.r

Description

The function stamp.multichange is a wrapper function that makes multiple calls to the stamp function to ease spatial-temporal analysis of multiple years of polygon data

Usage

1
2
stamp.multichange(polys, changeByRow = TRUE, changeByField = FALSE,
  changeField = "", ...)

Arguments

polys

a SpatialPolygonsDataFrame wiht 2+ years of data to run through the stamp function.

changeByRow

logical, whether or not each time period is a separate unique row of data (e.g., as per the katrina data)

changeByField

logical, whether or not time period data is given by a specific field. If this is TRUE, changeByRow should be false

changeField

string, name of the field which contains time period if changeByField is TRUE

...

list of paramater values to provide to the stamp function

Details

stamp.multichange is a simple wrapper function for the stamp function. The two options for data structure are those in the katrina data, where each time period is a row, and rows are time-ordered, and the structure of the mpb data, where time period is specified by a column. Time periods should be ordered from 1 through T.

Value

A SpatialPolygonsDataFrame which includes all outputs from the calls to the stamp function. If there are T time periods, there will be T-1 time periods in the resulting SpatialPolygonsDataFrame object.

Examples

1
2
3
4
5
6
library(sp)
data("katrina")
katrina$ID <- katrina$Id
ch <- stamp.multichange(katrina, changeByRow = TRUE, dc = 0, distance = TRUE, direction = FALSE)
STGroup <- stamp.stgroup.summary(ch)
head(STGroup)

colinr23/stampr documentation built on May 13, 2019, 9:54 p.m.