R/nr_nue.R

Defines functions nr_nue

#' nr_nue
#'
#' @param fulldata data to perform actions on
#'
#' @author Jan-Philipp Dietrich
nr_nue<-function(fulldata){
    budget <- nr_cropland_budget(fulldata)
    budget_out<- -dimSums(budget[,,c("harvest","ag_residues","bg_residues")],dim=3.1)
    budget_in<-dimSums(budget[,,c("fix_fertilizer","manure","fix_crops","fix_area",      
                                  "ag_residues_rec","bg_residues_rec","atm_deposition","SOM_loss","seed")],dim=3.1)
    out<-budget_out/budget_in
    return(setNames(out,"nue"))
}
pik-piam/nitrogen documentation built on Nov. 5, 2019, 12:48 a.m.