【发布时间】:2017-09-01 07:08:30
【问题描述】:
我在学习 R tool 并遵循了一个示例,但尽管我做的一切都是一样的,但我在 the plot raster 期间遇到了错误。
代码如下:
library(raster)
library(rgdal)
myRaster1 <- raster(nrow=4, ncol=4)
myRaster1[]<- 1:ncell(myRaster1)
myRaster2=raster(nrow=8, ncol=8)
resample(myRaster1, myRaster2, method='bilinear')
plot(myRaster2, main="Raster with 32 pixels")
这里是错误警告:
Error in .plotraster2(x, col = col, maxpixels = maxpixels, add = add, :
no values associated with this RasterLayer
我该如何解决这个问题?
【问题讨论】: