doTps: Provides a krige (automap, gstat) like interface to Tps...

Description Usage Arguments Value Author(s) Examples

View source: R/doTps.r

Description

Provides a krige (automap, gstat) like interface to Tps (fields)

Usage

1
doTps(formula, data, newdata, ..., debug.level = 1, addFit = FALSE)

Arguments

formula

A formula to define the dependent and the independent variables, see the documentation of krige.

data

The input data, should be a spatial object which supports coordinates extracting through coordinates()

newdata

A spatial object with the prediction locations.

...

parameters that are passed on to Tps

debug.level

standard value set to 1

addFit

logical, whether or not the output contains the fitted Tps model. See the value section below for more details.

Value

a spatial object with the same class as newdata with the prediction and the variance (NA in this case). The names of the columns match the outcome of the krige function. When addFit equals TRUE the function returns an autoKrige object with two elements: krige_output with the Tps prediction and variance and fit with the fitted Tps model.

Author(s)

Paul Hiemstra, p.h.hiemstra@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(sp)
data(meuse)
coordinates(meuse) = ~x+y
data(meuse.grid)
gridded(meuse.grid) = ~x+y

meuse_tps = doTps(zinc~dist, meuse, meuse.grid)
meuse_tps = doTps(zinc~1, meuse, meuse.grid)

summary(meuse_tps$krige_output)
meuse_tps$fit

MariekeDirk/GeoInterpolation documentation built on May 14, 2019, 8:20 a.m.