From this code:
na_cells <- as.data.frame(extract(r_temp, poly_contour, cellnumbers = TRUE))
Why do I get this warning?
Warning in `[<-`(`*tmp*`, cnt, value = p@polygons[[i]]@Polygons[[j]]) :
implicit list embedding of S4 objects is deprecated
Here are some details on my raster and shapefile:
> r_temp
class : RasterLayer
dimensions : 4876, 9864, 48096864 (nrow, ncol, ncell)
resolution : 30, 30 (x, y)
extent : 188384.5, 484304.5, 4914481, 5060761 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
data source : C:\Users\Pierre\AppData\Local\Temp\RtmpKWmDgF\raster\r_tmp_2016-05-16_204325_10956_97931.grd
names : layer
values : 1, 8 (min, max)
> poly_contour
class : SpatialPolygons
features : 1
extent : 189644.5, 483014.5, 4914961, 5060761 (xmin, xmax, ymin, ymax)
coord. ref. : +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
Recently, I have installed a new version of R (version 3.3.0). Before that, my code has worked. Is it possible that this warning is caused my version of R ?
installr
package. This may solve the problem.