I have two dem files downloaded via the getData function in the raster package.Here you can see the code:
I tried to make the example reproducible so there you have it.
library(raster)dem_n1
I tried to make the example reproducible so there you have it.
library(raster)dem_n1