knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
This package is a standalone re-implementation of GSIF::mpspline()
, which applies a mass-preserving spline to soil attributes. Splining soil data is a safe way to make continuous down-profile estimates of attributes measured over discrete, often discontinuous depth intervals.
Install from CRAN with
install.packages('mpspline2')
Install from github with
devtools::install_github("obrl-soil/mpspline2")
library(mpspline2) dat <- data.frame("SID" = c( 1, 1, 1, 1), "UD" = c( 0, 20, 40, 60), "LD" = c(10, 30, 50, 70), "VAL" = c( 6, 4, 3, 10), stringsAsFactors = FALSE) dat spl_dat <- mpspline_tidy(obj = dat, var_name = 'VAL') spl_dat$est_dcm
If you get stuck using this package, please post a question on Stack Overflow. This means that others can benefit from the discussion, and more people are available to help you. You're welcome to ping me in a comment or on twitter (@obrl_soil) to get my attention.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.