`stwin`

creates an object of class “`stwin`

” representing a three-dimensional space-time window.

1 |

`xcoord` |
A vector of x coordinate limits. |

`ycoord` |
A vector of y coordinate limits. |

`tcoord` |
A vector of t coordinate limits. |

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.

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. |

Robert Clements

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)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.