magclass (version 4.107.0)

as.data.frame-methods: ~~ Methods for Function as.data.frame ~~

Description

~~ Methods for function as.data.frame ~~

Usage

# S4 method for magpie
as.data.frame(x, rev = 1)

Arguments

x

A MAgPIE-object

rev

The revision of the algorithm that should be used for conversion. rev=1 creates columns with the predefined names Cell, Region, Year, Data1, Data2,... and Value, rev=2 uses the set names of the MAgPIE object for naming and adds an attribute "dimtype" to the data.frame which contains information about the types of the different columns (spatial, temporal, data or value).

Methods

list("signature(x = \"magpie\")")

Conversion creates columns for Cell, Region, Year, Data1, Data2,... and Value

Examples

Run this code
# NOT RUN {
data(population_magpie)
head(as.data.frame(population_magpie))
head(as.data.frame(population_magpie,rev=2))

# }

Run the code above in your browser using DataLab