Extract items of a given (sub-)dimension of a MAgPIE-object
Usage
getItems(x, dim = NULL, split = FALSE, full = FALSE)
getItems(x, dim, full = NULL, maindim = NULL, raw = FALSE) <- valueArguments
- x
MAgPIE object
- dim
Dimension for which the items should be returned. Either number or name of dimension or a vector of these. See
dimCodefor more details.- split
Boolean which determines whether a main dimension should be split in subdimensions. Only applicable to main dimensions (1,2,3) and ignored for all other.
- full
if TRUE dimension names are returned as they are (including repetitions), if FALSE only the dimension elements (unique list of entries) are returned.
- maindim
main dimension the data should be added to (does not need to be set if
dimexists in the data. Should be set ifdimmight not exist, or ifdimmight potentially exist in a different main dimension than the one anticipated).- raw
if set to FALSE inputs will be corrected (e.g. dots replaced by the letter "p") if necessary. If TRUE data will be written as is (risking the creation of inconsistent objects).
- value
a vector with the length of the main dimension the dimnames should be replaced in / added to. If set to NULL the corresponding dimension will be removed.
Value
items of the requested dimension in the MAgPIE-object. If split=TRUE and applied to a main dimension (1,2,3) a list of items for each sub-dimension.
See also
Other GetterSetter:
getCPR(),
getCells(),
getComment(),
getCoords(),
getDim(),
getNames(),
getRegionList(),
getRegions(),
getSets(),
getYears(),
setItems(),
setNames-methods