R/Humification_coefficient.R

Defines functions .hum_coef

#' Internal humification coefficient
#'
#' Calculate the humification coefficient as a function of clay fraction.
#'
#' @param f_clay Fraction of clay in soil.
#'
#' @return Numeric humification coefficient.
#'
#' @noRd
.hum_coef <- function(f_clay) {
  if (any(f_clay < 0 | f_clay > 1, na.rm = TRUE)) {
    stop("'f_clay' must be between 0 and 1.")
  }
  R <- 1.67 * (1.85 + 1.6 * exp(-7.86 * f_clay))
  return(1/(R+1))
}

Try the rCTOOL package in your browser

Any scripts or data that you put into this service are public.

rCTOOL documentation built on July 4, 2026, 9:07 a.m.