check.args: Validate common arguments for spatio-temporal grid-based routines
Description
Checks the validity of common inputs used by spatio-temporal estimation and simulation
routines: event locations X, spatial window specification s.region, temporal window
t.region, and grid resolution n.grid.
Invisibly returns NULL. Called for its side effect of throwing an error if inputs are invalid.
Arguments
X
A matrix or data frame with at least three columns giving event coordinates
\((x, y, t)\). Only the first three columns are used for validation.
s.region
Spatial observation region specification. Either:
a numeric vector of length 4 giving c(xmin, xmax, ymin, ymax), or
a numeric matrix with two columns giving polygon vertices (x, y) (at least 3 rows).
All values must be finite.
t.region
Numeric vector of length 2 giving c(tmin, tmax) with tmin < tmax.
Values must be finite.
n.grid
Integer vector of length 3 giving the number of grid cells in the \(x\), \(y\),
and time directions. Must be positive.
Details
This function is intended as a lightweight argument checker used internally by multiple functions.
It can also be called directly for debugging input issues.