stCheckSTcovars {SpatioTemporal} | R Documentation |
Checks that array/list of spatio-temporal covariates is valid, making sure
that at least all locations specified in ID.unique
exist. The function will
attempt to name extract locations ID's from colnames(ST)
and
observation dates from rownames(ST)
(using
convertCharToDate
).
stCheckSTcovars(ST, ID.unique = character(0), date.unique = integer(0))
ST |
A 3D- |
ID.unique |
vector with unique IDs that HAVE to be present in the ST-covariates, typically the observation locations and un-observation locations for predictions |
date.unique |
vector with unique dates/times that HAVE to be present in the ST-covariates, typically the observation time-points. |
Updated ST
array
Johan Lindstrom
Other object checking utilities: stCheckClass
,
stCheckCovars
, stCheckFields
,
stCheckObs
##load data data(mesa.model) ##check covariates tmp <- stCheckSTcovars( mesa.model$ST.all, mesa.model$locations$ID ) str(tmp) ##require non-existant site try( stCheckSTcovars( mesa.model$ST.all, "Bad.Site" ) ) ##require non-existant site try( stCheckSTcovars( mesa.model$ST.all, date.unique=1 ) )