Learn R Programming

magclass (version 3.74)

counter: Count elements

Description

Functions to count the number of cells/years/datasets/regions of an MAgPIE-object

Usage

ncells(x) nyears(x) ndata(x,fulldim=FALSE) nregions(x)

Arguments

x
A MAgPIE-object
fulldim
specifies, how the object is treated. In case of FALSE, it is assumed that x is 3 dimensional and dimnames(x)[[3]] is returned. In case of TRUE, the dimnames of the real third dimension namesare returned

Value

value
The number of cells/years/datasets/regions of x

Examples

Run this code
  a <- is.magpie(NULL)
  ncells(a)
  nyears(a)
  ndata(a)
  nregions(a)

Run the code above in your browser using DataLab