Package: magclass 6.17.1

Jan Philipp Dietrich

magclass: 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).

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

magclass_6.17.1.tar.gz
magclass_6.17.1.zip(r-4.5)magclass_6.17.1.zip(r-4.4)magclass_6.17.1.zip(r-4.3)
magclass_6.17.1.tgz(r-4.4-any)magclass_6.17.1.tgz(r-4.3-any)
magclass_6.17.1.tar.gz(r-4.5-noble)magclass_6.17.1.tar.gz(r-4.4-noble)
magclass_6.17.1.tgz(r-4.4-emscripten)magclass_6.17.1.tgz(r-4.3-emscripten)
magclass.pdf |magclass.html
magclass/json (API)

# Install 'magclass' in R:
install.packages('magclass', repos = c('https://ifpri.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/pik-piam/magclass/issues

Datasets:

On CRAN:

11.21 score 5 stars 56 packages 424 scripts 515 downloads 93 exports 2 dependencies

Last updated 4 months agofrom:f1466de76b. Checks:OK: 7. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 29 2024
R-4.5-winOKNov 29 2024
R-4.5-linuxOKNov 29 2024
R-4.4-winOKNov 29 2024
R-4.4-macOKNov 29 2024
R-4.3-winOKNov 29 2024
R-4.3-macOKNov 29 2024

Exports:add_columnsadd_dimensionas.arrayas.data.frameas.magpieas.RasterBrickas.SpatRasteras.SpatRasterDatasetas.SpatVectorclean_magpiecollapseDimcollapseNamescolMeanscolSumscomplete_magpieconvergencecopy.attributescopy.attributes<-copy.magpiedimCodedimExistsdimOrderdimReducedimSumsextendfulldimgetCellsgetCells<-getCommentgetComment<-getCoordsgetCoords<-getCPRgetDimgetItemsgetItems<-getNamesgetNames<-getRegionListgetRegionList<-getRegionsgetRegions<-getSetsgetSets<-getYearsgetYears<-guessResolutionhasCoordshasSetsifelseis.magpieis.spatialis.temporalisYearlogblowpassmagpie_expandmagpiesortmagpplymatchDimmaxamplembindmcalcmselectmselect<-ncellsndatandimnew.magpienregionsnyearsOpsread.magpieread.reportreplace_non_finiterowMeansrowSumssetCellssetCommentsetItemssetNamessetYearsshowspatRasterToDatasetsuppressSpecificWarningstime_interpolateunitsplitunwrapwherewrapwrite.magpiewrite.reportwrite.report2

Dependencies:abinddata.table

Concept behind magclass

Rendered frommagclass-concept.Rmdusingknitr::rmarkdownon Nov 29 2024.

Last update: 2022-03-18
Started: 2017-06-20

magclass 6

Rendered frommagclass6.Rmdusingknitr::rmarkdownon Nov 29 2024.

Last update: 2022-03-18
Started: 2021-08-31

MAGPIE Class Object Expansion

Rendered frommagclass-expansion.Rmdusingknitr::rmarkdownon Nov 29 2024.

Last update: 2022-03-18
Started: 2019-09-27

MAGPIE Class Tutorial

Rendered frommagclass.Rmdusingknitr::rmarkdownon Nov 29 2024.

Last update: 2022-03-18
Started: 2017-06-12

Readme and manuals

Help Manual

Help pageTopics
Data Class and Tools for Handling Spatial-Temporal Datamagclass-package magclass
add_columnsadd_columns
add_dimensionadd_dimension
magpie method for tibble::as_tibbleas_tibble.magpie
~~ Methods for Function as.array ~~as.array,ANY-method as.array,magpie-method as.array-methods
~~ Methods for Function as.data.frame ~~as.data.frame as.data.frame,ANY-method as.data.frame,magpie-method as.data.frame-methods
as.RasterBrickas.RasterBrick
as.SpatRasteras.SpatRaster
as.SpatRasterDatasetas.SpatRasterDataset
as.SpatVectoras.SpatVector
MAgPIE-Cleanclean_magpie
Collapse dataset dimensionscollapseDim
Collapse dataset namescollapseNames
~~ Methods for Function colSums and colMeans ~~colMeans,ANY-method colMeans,magpie-method colMeans-methods colSums,ANY-method colSums,magpie-method colSums-methods
complete_magpiecomplete_magpie
convergenceconvergence
Copy Attributescopy.attributes copy.attributes<-
Copy MAgPIE-filescopy.magpie
dimCodedimCode
dimExistsdimExists
dimOrderdimOrder
dimReducedimReduce
Summation over dimensionsdimSums
escapeRegexescapeRegex
extendextend
Reconstructs full dimensionality of MAgPIE objectsfulldim
Get CellsgetCells getCells<- setCells
getCommentgetComment getComment<- setComment
Get CoordinatesgetCoords getCoords<-
Get cells per regiongetCPR
getDimgetDim
Get ItemsgetItems getItems<-
Get dataset namesgetNames getNames<-
Get a list of celluare region-belongingsgetRegionList getRegionList<-
Get regionsgetRegions getRegions<-
Get setsgetSets getSets<-
Get yearsgetYears getYears<- setYears
guessResolutionguessResolution
Has CoordinateshasCoords
Has SetshasSets
head/tailhead.magpie tail.magpie
is.temporal, is.spatialis.spatial is.temporal
isYearisYear
log-method for MAgPIE objectslog,magpie-method log-methods logb,magpie-method logb-methods
Lowpass Filterlowpass
magclassdatamagclassdata
magpie_expandmagpie_expand
magpie_expand_dimmagpie_expand_dim
Class "magpie" ~~~as.magpie as.magpie,array-method as.magpie,data.frame-method as.magpie,logical-method as.magpie,lpj-method as.magpie,LPJmLData-method as.magpie,magpie-method as.magpie,NULL-method as.magpie,numeric-method as.magpie,quitte-method as.magpie,RasterBrick-method as.magpie,RasterLayer-method as.magpie,RasterStack-method as.magpie,SpatRaster-method as.magpie,SpatVector-method as.magpie,tbl_df-method as.magpie-methods ifelse,magpie-method is.finite,magpie-method is.infinite,magpie-method is.magpie is.na,magpie-method is.nan,magpie-method magpie-class Ops,magpie,magpie-method Ops,magpie,numeric-method Ops,numeric,magpie-method [,magpie,ANY,ANY-method [,magpie-method [<-,magpie,ANY,ANY-method [<-,magpie-method
MAgPIE-Sortmagpiesort
magpplymagpply
Match dimensions of a magpie object to those of a reference objectmatchDim
maxamplemaxample
mbindmbind
mcalcmcalc mcalc<-
MSelectmselect mselect<-
Count elementsncells ndata nregions nyears
Count sub-dimensionsndim
new.magpienew.magpie
population_magpiepopulation_magpie
printprint.magpie
Read MAgPIE-object from fileread.magpie
Read file in report formatread.report
Replace Non-Finite Datareplace_non_finite
Round-method for MAgPIE objectsround,magpie-method round-methods
~~ Methods for Function rowSums and rowMeans ~~rowMeans,ANY-method rowMeans,magpie-method rowMeans-methods rowSums,ANY-method rowSums,magpie-method rowSums-methods
Set ItemssetItems
Get dataset namessetNames setNames,magpie-method setNames,NULL-method setNames-methods
~~ Method for function 'show' ~~show show,ANY-method show,magpie-method show-methods
sizeChecksizeCheck
spatRasterToDatasetspatRasterToDataset
strstr.magpie
suppressSpecificWarningssuppressSpecificWarnings
time_interpolatetime_interpolate
splits a data.frame or vector of strings with form 'variable (unit)' into a data.frame with variable and unit separatedunitsplit
Unwrapunwrap
wherewhere
Wrapwrap
Write MAgPIE-object to filewrite.magpie
Write file in report formatwrite.report
Write file in report formatwrite.report2
Write a magpie object to a netCDF filewriteNC