krig: Krige soil data following the methodology of the John et al....

Description Usage Arguments Value Deprecated Breaks default Author(s) See Also Examples

Description

Use krig() to krige soil data following the methodology of the John et al. (2007). Features:

Usage

1
2
krig(soil, var, params = NULL, gridsize = 20, plotdim = NULL,
  breaks = krig_breaks(2, 320, 30), use_ksline = TRUE, quiet = FALSE)

Arguments

soil

The data frame with the points, coords specified in the columns gx, gy.

var

A character vector giving the name of each column in the soil dataset #' containing soil data to krige.

params

If you want to pass specified kriging parameters; see krig_auto_params() for each parameter.

gridsize

Points are kriged to the center points of a grid of this size.

plotdim

Numeric vector giving x and y dimensions of the plot. If NULL (default) it will be guessed. Otherwise, it must be of length 2 with the format c(x, y).

breaks

Breaks/intervals used to calculate the semivariogram.

use_ksline

Use the geoR::ksline() function? Use TRUE to calculate a "best" semivariogram based on default parameters via geoR::variogram()]. Use FALSE to base calculation on parameters passed to params.

quiet

Use TRUE to suppresses messages.

Value

A list with the following items:

Deprecated

krig() evolves from GetKrigedSoil(). GetKrigedSoil() has been deprecated, although it remains in the package as an internal function.

Breaks default

The default breaks argument is set to have more points where the exponential curve rises the most and fewer at large distances. This means that the curve fitting is not overly biased by points beyond the effective maximum range.

Author(s)

Graham Zemunik (grah.zem@gmail.com).

See Also

geoR::variofit(), geoR::variog(), geoR::as.geodata(), geoR::ksline(), geoR::krige.conv(), geoR::krige.control().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(fgeo.tool)

# Using automated parameters
summary(krig(soil_fake, var = "c"))

# Now using custom parameters (arbitrary but based on automated kriging params)
params <- list(
  model = "circular", range = 100, nugget = 1000, sill = 46000, kappa = 0.5
)

# Also using not one but multiple soil variables
vars <- c("c", "p")
custom <- krig(soil_fake, vars, params = params, quiet = TRUE)
summary(custom)

as_tibble(custom, name = "soil_var")

tail(as_tibble(custom, item = "df.poly"))

forestgeo/fgeo.krig documentation built on June 26, 2019, 8:09 p.m.