An example of this function in action is given in the vignette "Bayesian_lgcp", in the section on spatiotemporal data.
addTemporalCovariates(temporal.formula, T, laglength, tdata, Zmat)Note that if there is an intercept in the spatial part of the model e.g., X ~ var1 + var2, then in the temporal model, the intercept should be removed i.e., t ~ tvar1 + tvar2 - 1