#' @title Pick the \code{tillfac} parameter
#' @description Picks the correct model \code{tillfac} parameter based on tillage practice.
#' @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
#' @export
tillfac <- function(till_type, params = soilc_params) {
case_when(
till_type == "unknown" ~ params$tillfac_ft$be,
till_type == "full" ~ params$tillfac_ft$be,
till_type == "reduced" ~ params$tillfac_rt$be,
till_type == "zero" ~ params$tillfac_nt$be,
TRUE ~ params$tillfac_ft$be
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.