# Math-methods

From raster v1.0.0-1
by Robert Hijmans

##### Mathematical functions

Standard mathematical functions that can be used with a RasterLayer object as argument:
```
"abs", "sign", "sqrt", "ceiling", "floor", "trunc", "log", "log10", "log2", "log1p", "acos", "acosh", "asin",
"asinh", "atan", "atanh", "exp", "expm1", "cos", "cosh", "sin", "sinh", "tan", "tanh"
```

.

##### Note

If the values of the output RasterLayer cannot be held in memory, they will be saved to a temporary file.
If you want to set the filename (and perhaps format and datatype), use `calc`

instead of the Math-methods.

##### See Also

##### Examples

```
r1 <- raster()
r1 <- (setValues(r1, runif(ncell(r1))) - 0.5 ) * 10
r2 <- abs(r1)
r3 <- sqrt(r1)
```

*Documentation reproduced from package raster, version 1.0.0-1, License: GPL (>= 3)*

### Community examples

Looks like there are no examples yet.