R/reportRotationLength.R

Defines functions reportRotationLength

Documented in reportRotationLength

#' @title reportRotationLength
#' @description reports Forest rotation length.
#' 
#' @export
#' 
#' @param gdx GDX file
#' @return Forest rotation length
#' @author Abhijeet Mishra
#' @examples
#' 
#'   \dontrun{
#'     x <- reportRotationLength(gdx)
#'   }
#' 

reportRotationLength<-function(gdx){
  a <- NULL
  
  if(suppressWarnings(!is.null(readGDX(gdx,"fcostsALL")))){
    a <- RotationLength(gdx,level = "regglo")
    getNames(a) <- paste0("Rotation lengths|",getNames(a))
    getNames(a) <- paste0(getNames(a)," (years)")
  } else {message("NULL returned.")}
  
  return(a)
}
pik-piam/magpie4 documentation built on April 22, 2024, 3:34 p.m.