Get mean values of a raster band from each slice of a sampling box

read_sample(poly, dir, band)

Arguments

poly

is a spatial polygons object

dir

is a path to a directory of raster files

band

is the desired band of the raster to pull

Value

the mean values of the raster band across each slice of a sampling box