我正在尝试使用“raster”包绘制栅格,但我遇到了错误
这是我的代码
map = raster("A055E.tif")
plot(map)
Error in `colnames<-`(`*tmp*`, value = "A055E") :
length of 'dimnames' [2] not equal to array extent
sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rgdal_0.9-1 raster_2.3-0 sp_1.0-15
loaded via a namespace (and not attached):
[1] grid_3.1.1 lattice_0.20-29 tools_3.1.1
但是,当我在具有以下版本的 linux 机器上运行它时:R 版本 3.1.1 (2014-07-10) 平台:i686-pc-linux-gnu (32-bit), raster_2.2-31 sp_1.0 -15)
它没有给我一个问题