Skip to contents

Unlike the ncol and nrow functions of the 'terra' package, this function returns the number of columns and rows of the 'VirtualArray'-derived container, rather than the dimensions of the contained 'SpatRaster'-class object.

Usage

# S4 method for VirtualArray
ncol(x)

# S4 method for VirtualArray
nrow(x)

Arguments

x

A VirtualArray-derived class object.

Value

A numeric value of the number of columns and rows.

Examples

data(paleocoastlines)
ncol(paleocoastlines)
#> [1] 2
nrow(paleocoastlines)
#> [1] 3