mpspline_fit1: Fit spline parameters

View source: R/mpspline.R

mpspline_fit1R Documentation

Fit spline parameters

Description

Fit spline parameters to data for a single site.

Usage

mpspline_fit1(
  s = NULL,
  p = NULL,
  var_name = NULL,
  d = NULL,
  vhigh = NULL,
  vlow = NULL
)

Arguments

s

data.frame; data for one site

p

list; estimated spline parameters for one site from mpspline_est1

var_name

length-1 character or length-1 integer denoting the column in obj in which target data is stored. If not supplied, the fourth column of the input object is assumed to contain the target data.

d

sequential integer vector; denotes the output depth ranges in cm. Defaults to c(0, 5, 15, 30, 60, 100, 200) after the GlobalSoilMap specification, giving output predictions over intervals 0-5cm, 5-15cm, etc.

vhigh

numeric; constrains the maximum predicted value to a realistic number. Defaults to 1000.

vlow

numeric; constrains the minimum predicted value to a realistic number. Defaults to 0.

Value

list of two vectors: fitted values at 1cm intervals and the average of same over the requested depth ranges.


mpspline2 documentation built on April 4, 2022, 1:07 a.m.