filter_historical_mif: Filter improperly aggregated regional data from...

View source: R/filter_historical_mif.R

filter_historical_mifR Documentation

Filter improperly aggregated regional data from historical.mif

Description

Load a historical.mif file, remove designated data, write back to file.

Usage

filter_historical_mif(path = NULL, filter_table = NULL)

Arguments

path

Path to historical.mif (or any mif for that matter), defaults to historical.mif in the currently configured getConfig('outputfolder').

filter_table

Data frame with columns scenario, model, variable, include_regions, and exclude_regions. Defaults to the built-in ./inst/extdata/historical_mif_filter_table.csv of the mrremind package.

Details

For all combinations of scenario, model, and variable (and all years), either all regions listed in exclude_regions in the filter_table are removed, or all regions except those listed in include_regions in the filter_table are removed. Defining both include_regions and exclude_regions on the same row of filter_table will throw an error. Scenarios, models, and variables are matched precisely, not partially or via regular expressions.


pik-piam/mrremind documentation built on May 1, 2024, 2:12 a.m.