Learn R Programming

recexcavAAR (version 0.2.2)

kriglist: Apply kriging {kriging} to a list of data.frames

Description

kriging {kriging} is a simple and highly optimized ordinary kriging algorithm to plot geographical data. This interface to the method allows to not just apply it to one data.frame but to a list of data.frames. The result is reduced to the data.frame with the predicted values. For a more detailed output kriging {kriging} has to be called for the individual input data.frames.

Usage

kriglist(plist, x = 1, y = 2, z = 3, rdup = TRUE, ...)

Arguments

plist
List of data.frames with point coordinates
x
index of data.frame column with x-axis spatial points. Defaults to 1
y
index of data.frame column with y-axis spatial points. Defaults to 2
z
index of data.frame column with z-axis spatial points. Defaults to 3
rdup
switch to activate removal of double values for single horizontal positions in the input data.frames. Defaults to TRUE
...
Arguments to be passed to method kriging {kriging}

Value

list with data.frames which contains the predicted values along with the coordinate covariates

Examples

Run this code
df1 <- data.frame(
 x = rnorm(50),
 y = rnorm(50),
 z = rnorm(50) - 5
)

df2 <- data.frame(
 x = rnorm(50),
 y = rnorm(50),
 z = rnorm(50) + 5
)

lpoints <- list(df1, df2)

kriglist(lpoints, lags = 3, model = "spherical")

Run the code above in your browser using DataLab