Data Class and Tools for Handling Spatial-Temporal Data

Data class for increased interoperability working with spatial-temporal data together with corresponding functions and methods (conversions, basic calculations and basic data manipulation). The class distinguishes between spatial, temporal and other dimensions to facilitate the development and interoperability of tools build for it. Additional features are name-based addressing of data and internal consistency checks (e.g. checking for the right data order in calculations).


Data Class and Tools for Handling Spatial-Temporal Data

R package magclass, version 7.5.0

CRAN status DOI R build status codecov r-universe

Purpose and Functionality

Data class for increased interoperability working with spatial-temporal data together with corresponding functions and methods (conversions, basic calculations and basic data manipulation). The class distinguishes between spatial, temporal and other dimensions to facilitate the development and interoperability of tools build for it. Additional features are name-based addressing of data and internal consistency checks (e.g. checking for the right data order in calculations).

Installation

For installation of the most recent package version an additional repository has to be added in R:

options(repos = c(CRAN = "@CRAN@", pik = "https://rse.pik-potsdam.de/r/packages"))

The additional repository can be made available permanently by adding the line above to a file called .Rprofile stored in the home folder of your system (Sys.glob("~") in R returns the home directory).

After that the most recent version of the package can be installed using install.packages:

install.packages("magclass")

Package updates can be installed using update.packages (make sure that the additional repository has been added before running that command):

update.packages()

Tutorial

The package comes with vignettes describing the basic functionality of the package and how to use it. You can load them with the following command (the package needs to be installed):

vignette("magclass-concept")   # Concept behind magclass
vignette("magclass-expansion") # MAGPIE Class Object Expansion
vignette("magclass")           # MAGPIE Class Tutorial
vignette("magclass6")          # magclass 6

Questions / Problems

In case of questions / problems please contact Jan Philipp Dietrich [email protected].

Citation

To cite package magclass in publications use:

Dietrich J, Bodirsky B, Bonsch M, Humpenoeder F, Bi S, Karstens K, Leip D, Sauer P, Baumstark L, Bertram C, Giannousakis A, Klein D, Neher I, Pehl M, Schultes A, Stevanovic M, Wang X, Beier F, Pflüger M, Richters O, Rein P (2026). "magclass: Data Class and Tools for Handling Spatial-Temporal Data." doi:10.5281/zenodo.1158580 https://doi.org/10.5281/zenodo.1158580, Version: 7.5.0, https://github.com/pik-piam/magclass.

A BibTeX entry for LaTeX users is

@Misc{,
 title = {magclass: Data Class and Tools for Handling Spatial-Temporal Data},
 author = {Jan Philipp Dietrich and Benjamin Leon Bodirsky and Markus Bonsch and Florian Humpenoeder and Stephen Bi and Kristine Karstens and Debbora Leip and Pascal Sauer and Lavinia Baumstark and Christoph Bertram and Anastasis Giannousakis and David Klein and Ina Neher and Michaja Pehl and Anselm Schultes and Miodrag Stevanovic and Xiaoxi Wang and Felicitas Beier and Mika Pflüger and Oliver Richters and Patrick Rein},
 doi = {10.5281/zenodo.1158580},
 date = {2026-06-25},
 year = {2026},
 url = {https://github.com/pik-piam/magclass},
 note = {Version: 7.5.0},
}

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("magclass")

7.5.0 by Jan Philipp Dietrich, 3 months ago


https://github.com/pik-piam/magclass, https://doi.org/10.5281/zenodo.1158580


Report a bug at https://github.com/pik-piam/magclass/issues


Browse source code at https://github.com/cran/magclass


Authors: Jan Philipp Dietrich [aut, cre] (affiliation: Potsdam Institute for Climate Impact Research , ORCID: , Benjamin Leon Bodirsky [aut] (affiliation: Potsdam Institute for Climate Impact Research) , Markus Bonsch [aut] , Florian Humpenoeder [aut] (affiliation: Potsdam Institute for Climate Impact Research) , Stephen Bi [aut] , Kristine Karstens [aut] (affiliation: Potsdam Institute for Climate Impact Research) , Debbora Leip [aut] (affiliation: Potsdam Institute for Climate Impact Research) , Pascal Sauer [aut] (affiliation: Potsdam Institute for Climate Impact Research , ORCID: , Lavinia Baumstark [ctb] (affiliation: Potsdam Institute for Climate Impact Research) , Christoph Bertram [ctb] , Anastasis Giannousakis [ctb] , David Klein [ctb] (affiliation: Potsdam Institute for Climate Impact Research) , Ina Neher [ctb] , Michaja Pehl [ctb] (affiliation: Potsdam Institute for Climate Impact Research) , Anselm Schultes [ctb] , Miodrag Stevanovic [ctb] (affiliation: Potsdam Institute for Climate Impact Research) , Xiaoxi Wang [ctb] , Felicitas Beier [ctb] (affiliation: Potsdam Institute for Climate Impact Research) , Mika Pflüger [ctb] , Oliver Richters [ctb] (affiliation: Potsdam Institute for Climate Impact Research) , Patrick Rein [aut] (affiliation: Potsdam Institute for Climate Impact Research , ORCID:


Documentation:   PDF Manual  


LGPL-3 | file LICENSE license


Imports abind, data.table, rlang, stats

Depends on methods

Suggests covr, ggplot2, knitr, lpjmlkit, ncdf4, pkgconfig, quitte, raster, rmarkdown, terra, testthat, tibble, withr


Depended on by madrat.

Suggested by GDPuc, gms.


See at CRAN