最新的栅格包不会在Windows中绘制栅格对象

时间:2014-10-16 21:45:02

标签: r r-raster

我试图使用" 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位), raster_2.2-31 sp_1.0-15)

它没有给我一个问题

2 个答案:

答案 0 :(得分:0)

我认为如果你更新光栅包,事情会再次发挥作用。

答案 1 :(得分:0)

在Windows电脑上我有类似的问题 - 我无法使用plotRGB()绘制3波段栅格地图。解决方案是手动删除包装光栅&#39;然后再次安装它。

相关问题