## load a bundled map and reclassify it into a resistance surface
patchy <- terra::rast(
system.file("extdata", "patchy.asc", package = "grainscape", mustWork = TRUE)
)
patchyCost <- terra::classify(patchy, rcl = cbind(1:5, c(1, 10, 8, 3, 6)))
terra::plot(patchyCost)
Run the code above in your browser using DataLab