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 hero_radspline object created by radspline.

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 Matrix-class.

longlat

Use Euclidean (FALSE) or Great Circle (WGS84 ellipsoid) distance (TRUE). Default is FALSE.

join

A logical value. TRUE, the default, indicates that the predictions from each set of radial basis functions should be joined column-wise. Otherwise, a list with the predictions from each set of basis functions is returned.

...

Not currently implemented.

Value

An n×kn \times k matrix (or Matrix-class object if sparse = TRUE), where nn is the number of rows in newx and kk 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

radspline

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)

[Package hero version 0.6 Index]