"abs", "sign", "sqrt", "ceiling", "floor", "trunc", "log", "log10", "log2", "log1p", "acos", "acosh", "asin",
"asinh", "atan", "atanh", "exp", "expm1", "cos", "cosh", "sin", "sinh", "tan", "tanh"
.calc
instead of the Math-methods.Arith-methods
, calc
, overlay
r1 <- raster(nrow=10, ncol=10)
r1 <- (setValues(r1, runif(ncell(r1)))) * 10
r2 <- sqrt(r1)
b <- abs(stack(r1, r2) )
Run the code above in your browser using DataLab