sa.trans(slope = 48.146, aspect = 360.000)
library(terra)
elev <- rast(system.file("extdata/elev.tif", package="spatialEco"))
# Example of slope*cos(aspect)
sa <- terra::terrain(elev, v=c("slope", "aspect"), unit="degrees")
scosa <- terra::lapp(c(sa[[1]], sa[[2]]), fun = sa.trans)
Run the code above in your browser using DataLab