Arguments
x
RasterLayer object with elevation values. Values should have the same unit as the map units, or in meters when the crs is longitude/latitude
opt
Character vector containing one or more of these options: slope, aspect, TPI, TRI, roughness, flowdir (see Details)
unit
Character. 'degrees', 'radians' or 'tangent'. Only relevant for slope and aspect. If 'tangent' is selected that is used for slope, but for aspect 'degrees' is used (as 'tangent' has no meaning for aspect)
neighbors
Integer. Indicating how many neighboring cells to use to compute slope for any cell. Either 8 (queen case) or 4 (rook case). Only used for slope and aspect, see Details
filename
Character. Output filename (optional)
...
Standard additional arguments for writing Raster* objects to file