R/NUEbal.R

Defines functions NUEbal

Documented in NUEbal

#' Calculate NUE Balance
#' @description
#' The fraction of N inputs that are removed from the system.
#' Formula: NUEbal = No / Ni
#' @param No Sum total of N outputs.
#' @param Ni Sum total of N inputs.
#' @return A numeric vector of NUEbal values.
#' @examples
#' No <- c(50, 60)
#' Ni <- c(100, 110)
#' NUEbal(No, Ni)
#' @export
NUEbal <- function(No, Ni) {
  if (any(Ni == 0)) stop("Input N (Ni) cannot be zero.")
  return(No / Ni)
}

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.