# Small example
data(dem)
dem_slope = slope(dem)
plot(
dem, text_values = TRUE, breaks = "equal",
col = hcl.colors(11, "Spectral"), main = "input (elevation)"
)
# \donttest{
plot(
dem_slope, text_values = TRUE, breaks = "equal",
col = hcl.colors(11, "Spectral"), main = "output (slope)"
)
# Larger example
data(carmel)
carmel_slope = slope(carmel)
plot(
carmel, breaks = "equal",
col = hcl.colors(11, "Spectral"), main = "input (elevation)"
)
plot(
carmel_slope, breaks = "equal",
col = hcl.colors(11, "Spectral"), main = "output (slope)"
)
# }
Run the code above in your browser using DataLab