predict.hero_radspline {hero} | R Documentation |
Predict method for a hero_radspline
Description
Predicted values based on object created by
radspline
.
Usage
## S3 method for class 'hero_radspline'
predict(object, newx, sparse = TRUE, longlat = FALSE, join = TRUE, ...)
Arguments
object |
A |
newx |
A numeric matrix at which to evaluate the radial basis splines functions. |
sparse |
A logical value indicating if the result
should be a sparse version of the
|
longlat |
Use Euclidean ( |
join |
A logical value. |
... |
Not currently implemented. |
Value
An n \times k
matrix (or
Matrix-class
object if
sparse = TRUE
), where n
is the number of
rows in newx
and k
is the number of
basis functions in object
. Each row gives the
predicted values of each newx
value evaluated
at each of the basis functions.
See Also
Examples
border = border.grid(lon, lat)
r = radspline(nknots = c(36, 36 * 4), border = border)
newx = cbind(c(lon), c(lat))
p = predict(r, newx)