Description Usage Arguments Value Author(s) See Also Examples
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
).
1 | 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
1 2 3 4 5 6 7 8 9 10 | ##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 ) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.