radspline: Radial basis spline specification

View source: R/radspline.R

radsplineR Documentation

Radial basis spline specification

Description

radspline specifies a set of radial basis splines. nknots is the approximate number of knots to sample in the (usually) enlarged study area. If eborder is not provided, then eborder is automatically constructed by enlarging the border object using the enlarge function and width. See Details for additional information about sampling the knot locations.

Usage

radspline(
  nknots,
  border,
  poverlap = 2,
  k = 2,
  width,
  type = "hexagonal",
  longlat = FALSE,
  eborder,
  ...
)

Arguments

nknots

The approximate number of knots locations. Can be a vector of positive integers for successive samplings. See Details.

border

A SpatialPolygons-class object. If eborder is not supplied, this will be used to determine the sampling region for the knots. See Details.

poverlap

The proportional amount of overlap (>=1) beyond the nearest neighbor knots. Default is 2.

k

The order of the Wendland covariance function.

width

The width for the border enlargement.

type

The sampling type for spsample. The default is "hexagonal".

longlat

A logical value indicating whether Great Circle distances should be used (TRUE) or Euclidean distances (FALSE). The default is FALSE.

eborder

A SpatialPolygons-class object. The enlarged border from which the knots will be selected. If not supplied, this is automatically computed using border and width.

...

Additional arguments passed to spsample.

Details

The spsample function is used to "automatically" select the knot locations within eborder. nknots corresponds to the n argument in that function. A hexagonal sampling scheme is used by default, but other options are available.

Great circle distance IS NOT used in sampling from the regular grid. This is computationally expensive, so it has not been implemented. Great circle distance is only used when the constructed hero_radspline is evaluated (and longlat = TRUE).

Value

A hero_radspline object.

Examples

border = border.grid(lon, lat)
r = radspline(nknots = c(36, 36 * 4), border = border)
# default color scheme
plot(r)
# change color and point styles of points,
# and background of original domain
plot(r, blist = list(col = "yellow"),
        glist = list(col = c("blue", "orange"),
                     pch =  3:4))

hero documentation built on July 26, 2023, 5:11 p.m.