magclass (version 4.107.0)

clean_magpie: MAgPIE-Clean

Description

Function cleans MAgPIE objects so that they follow some extended magpie object rules (currently it makes sure that the dimnames have names and removes cell numbers if it is purely regional data)

Usage

clean_magpie(x, what = "all")

Arguments

x

MAgPIE object which should be cleaned.

what

term defining what type of cleaning should be performed. Current modes are "cells" (removes cell numbers if the data seems to be regional - this should be used carefully as it might remove cell numbers in some cases in which they should not be removed), "sets" (making sure that all dimensions have names) and "all" (performing all available cleaning methods)

Value

The eventually corrected MAgPIE object

See Also

"'>magpie"

Examples

Run this code
# NOT RUN {
 data(population_magpie)
 a <- clean_magpie(population_magpie)

# }

Run the code above in your browser using DataLab