#' @title Calculate the \code{f2} parameter
#' @description Calculates the \code{f2} model parameter, which is specific to tillage type.
#' @param till_type A character vector indicating tillage type. One of "unknown", "full", "reduced",
#' or "zero".
#' @param params A named list containing model parameters. Defaults to the package default parameter
#' set \code{soilc_params}.
#' @import dplyr
f2 <- function(till_type, params = soilc_params) {
case_when(
till_type == "unknown" ~ params$f2$be,
till_type == "full" ~ params$f2_ft$be,
till_type == "reduced" ~ params$f2_rt$be,
till_type == "zero" ~ params$f2_nt$be,
TRUE ~ params$f2$be
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.