stm {stppSim}R Documentation

Spatial and temporal model

Description

To generate graphics depicting the spatial and temporal models of the final simulation

Usage

stm(pt, poly, df, crsys = NULL,
display_output = FALSE)

Arguments

pt

a data frame with the first three fields being 'x', 'y', and 'z' information.

poly

(An sf or S4 object) a polygon shapefile defining the extent of a landscape. Default: NULL, in which the spatial extent of pt is utilized.

df

a vector or 1-column data frame containing values for the time series.

crsys

(string) the EPSG code of the projection system of the ppt coordinates. This only used if poly argument is NULL. See "http://spatialreference.org/" for the list of EPSG codes for different regions of the world. As an example, the EPSG code for the British National Grid projection system is: "EPSG:27700".

display_output

(logical) display the output. Default: FALSE

Details

Incorporated into psim_artif and psim_real functions to allow the preview of the spatial and the temporal model of the simulation. The spatial model is the strength distribution of origin which is the likeness of the spatial patterns to be simulated. The temporal model is the preview of the trend and seasonal patterns to be expected from the simulation.

Value

A graphics showing the spatial and temporal model of the simulation.

Examples

## Not run: 
#load polygon shapefile
load(file = system.file("extdata", "camden.rda",
package="stppSim"))
camden_boundary = camden$boundary
#read xyz data
data(xyz)
#create a time series
t <- seq(0,5,0.5)
df <- data.frame(data = abs(min(sin(t))) + sin(t))
#run function
stm(pt = xyz, poly=camden_boundary, df=df,
crsys = NULL, display_output = FALSE)

## End(Not run)

[Package stppSim version 1.3.4 Index]