magclass (version 4.107.0)

ncells: Count elements

Description

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

Usage

ncells(x)

ndata(x, fulldim = FALSE)

nregions(x)

nyears(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

Functions

  • ndata: count datasets

  • nregions: count regions

  • nyears: count years

Examples

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

# }

Run the code above in your browser using DataLab