ncell

0th

Percentile

Number or rows, columns, and cells of a Raster* object

Get the number of rows, columns, or cells of a Raster* object.

Keywords
spatial
Usage
ncol(x)
nrow(x)
ncell(x)
ncol(x) <- value
nrow(x) <- value
Arguments
x

a Raster object

value

row or column number (integer > 0)

Value

Integer

See Also

dim, extent, res

Aliases
  • ncol
  • nrow
  • nrow,BasicRaster-method
  • ncol,BasicRaster-method
  • ncell
  • ncell,ANY-method
  • ncell,BasicRaster-method
  • length,BasicRaster-method
  • nrow<-
  • ncol<-
Examples
# NOT RUN {
r <- raster()
ncell(r)
ncol(r)
nrow(r)
dim(r)

nrow(r) <- 18
ncol(r) <- 36
# equivalent to
dim(r) <- c(18, 36) 
# }
Documentation reproduced from package raster, version 2.7-15, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.