mpsplinet: Fits a mass preserving spline

View source: R/mass_splines.R

mpsplinetR Documentation

Fits a mass preserving spline

Description

Fits a mass preserving spline to a soil profile data

Usage

mpsplinet(
  obj,
  var.name,
  lam = 0.1,
  d = t(c(0, 5, 15, 30, 60, 100, 200)),
  vlow = 0,
  vhigh = 1000,
  show.progress = TRUE
)

Arguments

obj

object of class SoilProfileCollection

var.name

character target variable name (must be a numeric variable)

lam

numeric lambda the smoothing parameter

d

numeric standard depths

vlow

numeric smallest value of the target variable (smaller values will be replaced)

vhigh

numeric highest value of the target variable (larger values will be replaced)

show.progress

logical specifies whether to display the progress bar

Value

Returns a list with four elements: idcol - site ID column var.fitted - matrix; are are spline-estimated values of the target variable at observed depths (upper and lower depths are indicated as attributes) var.std - matrix; are spline-estimated values of the target variable at standard depths var.1cm - matrix; are spline-estimated values of the target variable using the 1 cm increments

Author(s)

Brendan Malone and Tomislav Hengl

Examples

# mpsplinet(rdSoil,
#          var.name = "C", lam = 0.1,
#          d = t(c(0, 10)), vlow = 0,
#          vhigh = 1000, show.progress = TRUE
# )

elpidiofilho/mdsFuncs documentation built on April 14, 2022, 5:40 p.m.