from polygons, copy the first column of data for every cell the cells and grid MUST match, but the polygons can be in any projection Make sure the polygons have the first column as the classifier you want

classify_cells_by_polygon(cells, grid, polygons)

Arguments

cells

raster cell index

grid

raster for the cells

polygons

SpatialPolygonsDataFrame