R/correctGLW3.R

Defines functions correctGLW3

Documented in correctGLW3

#' @title correctGLW3
#' @description Read GLW3 file
#' @return Magpie objects with results on cellular level, weight, unit and description.
#' @param x magpie object provided by the read function
#' @author Marcos Alves
#' @seealso
#'   \code{\link{readGLW3}}
#' @examples
#'
#' \dontrun{
#'   readSource("GLW3", subtype = "DA", convert="onlycorrect")
#' }
#'
#' @importFrom madrat toolConditionalReplace

correctGLW3<- function(x){
  
  x <- toolConditionalReplace(x, conditions = c("is.na()","<0"), replaceby = 0)
  
  return(x)
}
pik-piam/mrland documentation built on Nov. 23, 2024, 11:37 a.m.