Noticed that the README was failing after I installed the latest version of the terra package. I've found the issue, captured in the small reproducible example:
library(slopes)
u = "https://github.com/ITSLeeds/slopes/releases/download/0.0.0/dem_lisbon.tif"
if(!file.exists("dem_lisbon.tif")) download.file(u, "dem_lisbon.tif")
r = lisbon_road_segments
et = terra::rast("dem_lisbon.tif")
slope_raster = slope_raster(r, et)
#> [1] TRUE
#> Error in `[.data.frame`(terra::extract(e, m[, 1:2], method = method), : undefined columns selected
Noticed that the README was failing after I installed the latest version of the terra package. I've found the issue, captured in the small reproducible example:
Created on 2021-01-10 by the reprex package (v0.3.0)