【发布时间】:2019-05-24 00:38:10
【问题描述】:
我正在使用包raster 中的函数rasterToPoints()。默认情况下,此函数省略 NA 值。
raster <- raster(matrix(c(1,2,NA, 1,2,3, 1,2,3), nrow = 3, ncol = 3 ))
raster_points <- rasterToPoints(raster, na.rm = FALSE)
因此,我放置了一个包含 200 个单元格的栅格,我得到了一个只有 150 行的 data.frame。如何在最终的 data.frame 中获得带有空单元格的点?
【问题讨论】: