I'm a bit of an R novice and looking to see if there is any way to assign values to a raster layer based upon polygons.
Some background - I am working on a mining project and have a regular grid of polygons that contains attributes (ie. material type). I have also created a masked raster that represents Z elevations for an excavator bucket (see images 1 & 2).
I am trying to use extract() with no success - is there away to assign the material type inside a polygon to the raster layer so that i can calculate how much of each material has been over-mined in the Z?