Skip to content

Object Creation

Functions for creating and validating MAgPIE objects.

clean_magpie()
MAgPIE-Clean
complete_magpie()
complete_magpie
copy.attributes() `copy.attributes<-`()
Copy Attributes
new.magpie()
new.magpie

Getter and Setter Functions

Functions for getting and setting dimension names, items, and metadata of MAgPIE objects.

getCPR()
Get cells per region
getCells() `getCells<-`() setCells()
Get Cells
getComment() `getComment<-`() setComment()
getComment
getCoords() `getCoords<-`()
Get Coordinates
getDim()
getDim
getItems() `getItems<-`()
Get Items
getNames() `getNames<-`()
Get dataset names
getRegionList() `getRegionList<-`()
Get a list of celluare region-belongings
getRegions() `getRegions<-`()
Get regions
getSets() `getSets<-`()
Get sets
getYears() `getYears<-`() setYears()
Get years
setItems()
Set Items
setNames(<magpie>)
Get dataset names

Object Information

Functions for querying object properties like dimensions, size, and checking object characteristics.

dimExists()
dimExists
fulldim()
Reconstructs full dimensionality of MAgPIE objects
hasCoords()
Has Coordinates
hasSets()
Has Sets
is.temporal()
is.temporal, is.spatial
isYear()
isYear
ncells() ndata() nregions() nyears()
Count elements
ndim()
Count sub-dimensions
sameDims()
sameDims

Conversion to and from MAgPIE Objects

Functions for converting between MAgPIE objects and other data types like arrays, data.frames, tibbles, and spatial formats.

as.RasterBrick()
as.RasterBrick
as.SpatRaster()
as.SpatRaster
as.SpatRasterDataset()
as.SpatRasterDataset
as.SpatVector()
as.SpatVector
as.array(<magpie>)
~~ Methods for Function as.array ~~
as.data.frame(<magpie>)
~~ Methods for Function as.data.frame ~~
as_tibble(<magpie>)
magpie method for tibble::as_tibble
unwrap()
Unwrap
wrap()
Wrap

Dimension Manipulation

Functions for manipulating dimensions of MAgPIE objects including adding, collapsing, and reordering dimensions.

addDim()
addDim
add_columns()
add_columns
collapseDim()
Collapse dataset dimensions
collapseNames()
Collapse dataset names
dimCode()
dimCode
dimOrder()
dimOrder
dimReduce()
dimReduce

File I/O

Functions for reading and writing MAgPIE objects to various file formats.

copy.magpie()
Copy MAgPIE-files
read.magpie()
Read MAgPIE-object from file
read.report()
Read file in report format
write.magpie()
Write MAgPIE-object to file
write.report()
Write file in report format
write.report2()
Write file in report format

Aggregation

Functions for summing and aggregating data across dimensions.

colSums(<magpie>)
~~ Methods for Function colSums and colMeans ~~
dimSums()
Summation over dimensions
rowSums(<magpie>)
~~ Methods for Function rowSums and rowMeans ~~

Data Binding

Functions for binding, merging, and expanding MAgPIE objects.

cbind(<magpie>)
cbind method for MAgPIE objects
extend()
extend
magpie_expand()
magpie_expand
magpiesort()
MAgPIE-Sort
matchDim()
Match dimensions of a magpie object to those of a reference object
mbind()
mbind

Selection and Calculation

Functions for selecting subsets and performing calculations on MAgPIE objects.

magpply()
magpply
mcalc()
mcalc
mselect() `mselect<-`()
MSelect
where()
where

Display

Functions for displaying, printing, and visualizing MAgPIE objects.

head(<magpie>)
head/tail
maxample()
maxample
mplot()
mplot
print(<magpie>)
print
show(<magpie>)
~~ Method for function show ~~
str(<magpie>)
str

Temporal Operations

Functions for temporal interpolation, convergence, and time-based calculations.

commonYears()
commonYears
convergence()
convergence
lowpass()
Lowpass Filter
time_interpolate()
time_interpolate

Spatial Operations

Functions for working with spatial data including array reshaping, coordinate handling, and raster operations.

guessResolution()
guessResolution
spatRasterToDataset()
spatRasterToDataset

Utility Functions

Miscellaneous utility functions.

replace_non_finite()
Replace Non-Finite Data
unitjoin()
joins a data.frame or vector of strings with variable and unit separated into a data.frame with variable and unit joined as 'variable (unit)'. Use magclass::unitsplit to split them again
unitsplit()
splits a data.frame or vector of strings with form 'variable (unit)' into a data.frame with variable and unit separated

Math Operations

Mathematical operations on MAgPIE objects.

log(<magpie>)
log-method for MAgPIE objects
round(<magpie>)
Round-method for MAgPIE objects
pmax(<magpie>) pmin(<magpie>)
pmin/pmax

MAgPIE Class and Data

MAgPIE class definition and example data.

Internal Functions

Internal functions and deprecated functions.

add_dimension()
add_dimension
fulldim()
Reconstructs full dimensionality of MAgPIE objects
escapeRegex()
escapeRegex
magpie_expand_dim()
magpie_expand_dim
sizeCheck()
sizeCheck
suppressSpecificWarnings()
suppressSpecificWarnings