hf_slope: Function for computing slope in degrees

Description Usage Arguments Value Examples

View source: R/hf_slope.R

Description

This is a convenient (maybe?) wrapper around raster::terrain().

Usage

1
hf_slope(dem)

Arguments

dem

A RasterLayer with elevation values in the same units as crs.

Value

A RasterLayer with slope values in degrees.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

library(raster)

dem <- raster(system.file("extdata/slc.grd", package = "rHike"))

slope <- hf_slope(dem)

plot(slope)


## End(Not run)

kbvernon/rHike documentation built on May 29, 2020, 7:22 p.m.