View source: R/functions_tprs.R
computeTPRS | R Documentation |
Compute TPRS basis for given spatial coordinates
computeTPRS(coords, maxdf, rearrange = TRUE, intercept = FALSE)
coords |
Data frame containing the coordinates. |
maxdf |
Largest number of splines to include in TPRS basis |
rearrange |
Logical indicator of whether to rearrange the columns of TPRS basis |
intercept |
Logical indicator of whether or not to remove the intercept column |
This function creates a TPRS basis using the mgcv
package from the given coordinates with the option to rearrange the columns such that last two columns are moved to the left of the matrix and the third-from last column, which corresponds to the intercept, is optionally removed.
arrangeTPRS
x <- runif(100)
y <- runif(100)
mat <- computeTPRS(data.frame(x, y), maxdf=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.