a dataframe contains longitude and latitude of point samples.
trainy
a vector of response, must have length equal to the number of
rows in longlat.
longlat2
a dataframe contains longitude and latitude of point locations
(i.e., the centres of grids) to be predicted.
nmax
for a local predicting: the number of nearest observations that
should be used for a prediction or simulation, where nearest is
defined in terms of the space of the spatial locations. By default, 12
observations are used.
idp
numeric; specify the inverse distance weighting power.
...
other arguments passed on to gstat.
Value
A dataframe of longitude, latitude and predictions.
References
Pebesma, E.J., 2004. Multivariable geostatistics in S: the gstat
package. Computers & Geosciences, 30: 683-691.