My polygons (p) was read from a shapefile (shp). I know that I can extract the polygon means by: means <- extract (r, p, fun="mean")
My question is how I can match each mean with the attributes in the shapefile (names of each polygon).
Thanks for your feedback.