Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

adimatt

Number of columns and rows of a RasterArray or SpatialArray


Description

Unlike the ncol and nrow functions of the raster package (ncell), this function returns the number of columns and rows of the RasterArray container, rather than the dimensions of the contained RasterLayers.

Usage

## S4 method for signature 'XArray'
ncol(x)

## S4 method for signature 'XArray'
nrow(x)

Arguments

x

A RasterArray or SpatialArray class object.

Value

A numeric value of the number of columns and rows.

Examples

data(coasts)
ncol(coasts)
nrow(coasts)

chronosphere

Earth System History Variables

v0.4.1
CC BY 4.0
Authors
Adam T. Kocsis, Nussaibah B. Raja
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.