#' nr_plant_products
#'
#' @param fulldata data to perform actions on
#'
#' @author Jan-Philipp Dietrich
nr_plant_products<-function(fulldata){
kcr<-expand.set(fulldata,"kcr")
fooduse<-nr_use(fulldata=fulldata,nutrient="nr")[,,"food"][,,kcr]
convby<-dimSums(nr_convby_use(fulldata)[,,c("feed","other_util","processing","waste")],dim=3.1)
out<-setNames(dimSums(fooduse,dim=c(3.1,3.2))-convby,"plant_products")
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.