dimensions

0th

Percentile

Dimensions of a Raster* object

Get (or set) the number of rows, columns, and layers of a Raster* object. You cannot use this function to set the dimentions of a RasterStack object.

Keywords
spatial
Value

  • Integer

Methods

dim(x) rll{ x Raster* object } dim(x) <- value rll{ x RasterLayer or RasterBrick) value row number, or row _and_ column number (for a RasterLayer and a RasterBrick); or a row and column number _and_ the number of layers (only for a RasterBrick) }

See Also

ncell, extent, res

Aliases
  • dim,RasterStackBrick-method
  • dim,BasicRaster-method
  • dim<-,RasterLayer-method
  • dim<-,RasterBrick-method
Examples
r <- raster()
dim(r)
dim(r) <- c(18) 
dim(r)
dim(r) <- c(18, 36) 
dim(r)
b <- brick(r)
dim(b)
dim(b) <- c(10, 10, 5)
dim(b)
Documentation reproduced from package raster, version 1.6-22, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.