powered by
Provides an implementation of the Gaussian radial basis functions defined as $$ \Psi_{j}(s) = \exp\{- \frac{1}{2} (||s - c_j||/w)^2\}.$$
radial(crd, knots, w = NULL, ..., longlat = TRUE)
A matrix object. The (x,y) coordinates of the reference points {nCrd x 2}.
A matrix object. The (x,y) coordinates of the knots {r x 2}.
A numeric object. The positive scaling factor (bandwidth).
ignored. Included only to require naming of inputs that follow.
A logical object. If FALSE, Euclidean distance is calculated; if TRUE, Great Circle distance is calculated. See ?sp::spDists for more information.
A matrix of Gaussian functions evaluated at all combinations of crd and knots { nCrd x r }.
Distances between reference coordinates and knots are obtained using sp::spDists().
# NOT RUN { data(countyExample) radial(crd = sp::coordinates(county), knots = knots) # }
Run the code above in your browser using DataLab