powered by
Get the number of rows, columns, or cells of a Raster* object.
ncol(x) nrow(x) ncell(x) ncol(x) <- value nrow(x) <- value
a Raster object
row or column number (integer > 0)
Integer
dim, extent, res
dim, extent
# 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) # }
Run the code above in your browser using DataLab