A vector of length nlayers(x) with values between 1 and nlayers(x)
fun
A function that returns a single value, e.g. mean or min, and that takes an 'na.rm' argument
na.rm
Logical. If TRUE, NA cells are removed from calculations
filename
Character. Optional output filename
...
Additional arguments. See below, under Methods
Value
A new Raster* object, and in some cases the side effect of a new file on disk.
Methods
The following additional arguments can be passed, to replace default values for this function
rll{
format Character. Output file type. See writeRasterdatatype Character. Output data type. See dataTypeoverwrite Logical. If TRUE, "filename" will be overwritten if it exists
progress Character. "text", "window", or "" (the default, no progress bar)
}