powered by
Sample a random DEM with specified size from a larger DEM
dem_sample(data, L, allow_NA = 0, plot = FALSE, max_iter = 100)
Digital elevation model of class RasterLayer.
Size of square to cut out of DEM.
Proportion of NA values allowed in the sample. Useful when DEM is not regular.
Logical. Plot the DEM and the cropped section?
Maximum number of random crops to try when allow_NA = FALSE before failing.
dem <- dem_sample(horseshoe, L = 2, plot=TRUE)
Run the code above in your browser using DataLab