# NOT RUN {
##load the data
data(mesa.data.raw)
##and create STdata-object
mesa.data <- createSTdata(mesa.data.raw$obs, mesa.data.raw$X, n.basis=2,
SpatioTemporal=mesa.data.raw["lax.conc.1500"])
mesa.data.mean0 <- removeSTcovarMean(mesa.data)
##compare the data structures
##geographic covariates
summary(mesa.data$covars)
summary(mesa.data.mean0$covars)
##mean of the spatio-temporal covariate, note that the new
##contains both mean-zero and original
cbind(colMeans(mesa.data$SpatioTemporal),
colMeans(mesa.data.mean0$SpatioTemporal))
# }
Run the code above in your browser using DataLab