R/convertExpertGuess.R

Defines functions convertExpertGuess

#' @title convertExpertGuess
#' @description Converts data from expert guess
#' @param x unconverted magpie object from read-script
#' @param subtype Type of data that are converted. 
#' 
#' @return magpie object with a completed dataset.
#' 
#' @seealso
#' \code{\link{convertExpertGuess}}


convertExpertGuess <- function(x,subtype) 
{
  
  if (subtype == "costsTradePeFinancial"){
    # use data for each country that belongs to a region
    # No weighting for spatial aggregation
    out <- toolAggregate(x, toolMappingFile("regional","regionmappingH12.csv"), weight=NULL)  
  } else { 
    out <- x
  }

  return(out)
}
pik-piam/moinput documentation built on June 9, 2020, 12:23 p.m.