R/PNB.R

Defines functions PNB

Documented in PNB

#' Calculate Partial N Balance (PNB)
#' @description
#' The expression of plant N content per unit of fertilizer N applied.
#' Formula: PNB = PlantNf / FertN
#' @param PlantNf A numeric vector of Plant N content in fertilized conditions.
#' @param FertN A numeric value or vector for fertilizer N input.
#' @return A numeric vector of PNB values.
#' @examples
#' PlantNf <- c(3.5, 4.0, 4.2)
#' FertN <- 50
#' PNB(PlantNf, FertN)
#' @export
PNB <- function(PlantNf, FertN) {
  if (any(FertN == 0)) stop("FertN cannot be zero.")
  return(PlantNf / FertN)
}

Try the NUETON package in your browser

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

NUETON documentation built on Dec. 18, 2025, 1:07 a.m.