Math-methods

0th

Percentile

Mathematical functions

Generic mathematical functions that can be used with a Raster* object as argument:

"abs", "sign", "sqrt", "ceiling", "floor", "trunc", "cummax", "cummin",

"cumprod", "cumsum", "log", "log10", "log2", "log1p", "acos", "acosh", "asin",

"asinh", "atan", "atanh", "exp", "expm1", "cos", "cosh", "sin", "sinh", "tan", "tanh".

Keywords
methods, spatial, math
Note

You can use the, somewhat more flexible, function calc instead of the Math-methods.

See Also

Arith-methods, calc, overlay, atan2

Aliases
  • Math-methods
  • log,Raster-method
Examples
library(raster) # NOT RUN { r1 <- raster(nrow=10, ncol=10) r1 <- setValues(r1, runif(ncell(r1)) * 10) r2 <- sqrt(r1) s <- stack(r1, r2) - 5 b <- abs(s) # }
Documentation reproduced from package raster, version 2.6-7, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.