Create a space-time window

Share:

Description

stwin creates an object of class “stwin” representing a three-dimensional space-time window.

Usage

1
stwin(xcoord = c(0, 1), ycoord = c(0, 1), tcoord = c(0, 1))

Arguments

xcoord

A vector of x coordinate limits.

ycoord

A vector of y coordinate limits.

tcoord

A vector of t coordinate limits.

Details

To create a space-time point process object of class “stpp”, an enclosing space-time window of class “stwin” must be created and passed to stpp.

The window must be box shaped. Each vector of coordinates must be of length two and ordered from smallest to largest. Every combination of the entries of the three vectors represents the 8 corners of the space-time window.

If no coordinates are given, the default is a unit cube.

Value

Outputs an object of class “stwin” describing a three-dimensional space-time cuboid, which is a list of

xcoord

A vector of x limits.

ycoord

A vector of y limits.

tcoord

A vector of t limits.

Author(s)

Robert Clements

See Also

stpp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#===> create a stpp object <===#
x <- rnorm(30, mean = 10, sd = 1)
y <- rnorm(30, mean = 100, sd = 10)
t <- runif(30, 0, 100)
stw <- stwin(xcoord = c(0, 20), ycoord = c(50, 150), tcoord = c(0, 100))
X <- stpp(x, y, t, stw = stw)

#===> create a stpp object from redbanana data <===#
data(redbanana)
attach(redbanana)
xcoord <- c(min(longitude)-.01, max(longitude)+.01)
ycoord <- c(min(latitude)-.01, max(latitude)+.01)
tcoord <- c(0, max(birth)+.01)
stw <- stwin(xcoord, ycoord, tcoord)
X <- stpp(longitude, latitude, birth, stw)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.