Description Usage Arguments Value Deprecated Breaks default Author(s) See Also Examples
Use krig()
to krige soil data following the methodology of the John et al.
(2007). Features:
Tries to guess plotdim
.
Informs the guessed plotdim
and the gridsize
provided.
Allows to suppress messages.
Is vectorized over the argument var
, to easily iterate over multiple soil
variables.
Has a method for base::summary()
(see examples).
Has a method for tibble::as_tibble()
(see examples).
1 2 |
soil |
The data frame with the points, coords specified in the
columns |
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
|
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
|
breaks |
Breaks/intervals used to calculate the semivariogram. |
use_ksline |
Use the |
quiet |
Use |
A list with the following items:
df
: Data frame of kriged values (column z) at each grid point (x, y).
df.poly
: Data frame of the polynomial surface fitted to the raw data.
lambda
: The "lambda" value used in the Box-Cox transform of the raw
data.
vg
: A list giving the variogram parameters used for the kriging.
vm
: Minimum loss value returned from geoR::variofit()
.
krig()
evolves from GetKrigedSoil()
. GetKrigedSoil()
has been
deprecated, although it remains in the package as an internal function.
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.
Graham Zemunik (grah.zem@gmail.com).
geoR::variofit()
, geoR::variog()
, geoR::as.geodata()
,
geoR::ksline()
, geoR::krige.conv()
, geoR::krige.control()
.
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.