How to modify a polygon to be a hole (SpatialPolygons) changing its slots
问题 Edit: As suggested by Edzer Pebesma in the comments, the recommended method to add a hole to a polygon is not to modify the slot but to rebuild the polygon, as illustrated in this related question. Original question Following the help of SpatialPolygons-class I tried to modify a polygon to be a hole of an other polygon but while the "hole polygon" is displayed as a border of the other polygon, its inside is colored as the rest. What am I doing wrong? Using defPunched and defHole defined here: