getCPR | R Documentation |
Counts how often each element of the provided subdimension exists in the given data set. Originally created to count the number of cells in a region (this is also where its name originates from) it can now be used to count elements of any subdimension via the dim argument.
getCPR(x, dim = 1.1)
x |
MAgPIE object or a resolution written as numeric (currently only data for 0.5 degree resolution is available). |
dim |
Dimension for which the items should be returned. Either number or
name of dimension or a vector of these (in case of a vector all subimensions
must belong to the same main dimension!). See |
cells per region
Jan Philipp Dietrich
getRegions
, read.magpie
,
write.magpie
getCPR(0.5)
a <- maxample("animal")
getCPR(a, dim = "color")
getCPR(a, dim = 3.2)
getCPR(a, dim = "country")
getCPR(a, dim = c("color", "species"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.