area(x, ...)
filename
Filename for the output RasterLayer
format
Character. Output file type. See writeRaster
datatype
Character. Output data type. See dataType
overwrite
Logical. If TRUE
, "filename" will be overwritten if it exists
progress
Character. Valid values are "text", "tcltk", "windows" (on that platform only) and ""
}r <- raster(nrow=18, ncol=36)
a <- area(r)
Run the code above in your browser using DataLab