[問題] R 如何讀圖層 (raster)

作者: tai34 (tai)   2013-12-16 00:20:20
各位大大好
我想利用 raster package 讀取 tif 或 grd 檔
我將說明書內的指令修改成
myExpl = stack("D:/R/external/bio/bio_1.grd")
或是 myExpl = stack("D:/R/external/bio_1.tif")
出現了
Error in .rasterobjectFromFile(x, objecttype = "RasterBrick",...):
Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
然後我就依照他指示裝了 rgdal
結果依然無法如願
請問我要如何修改才能讓 R 讀我的圖層?
另外也請問說明書的某段指令為 cat('\n',myRespName,'modeling...')內的...真的只要打...就好了嗎?
謝謝各位大大
作者: ccwang002 (亮)   2013-02-16 00:31:00
有沒有安裝rgdal後的錯誤訊息?另外cat只是訊息沒有功能
作者: tai34 (tai)   2013-02-16 01:00:00
In library(package, lib.loc = lib.loc, character.only =TRUE, logical.return = TRUE, :there is no package called ‘ncdf’Error in .rasterObjectFromFile(x, objecttype = "RasterBrick", ...) :Cannot create a RasterLayer object from this file. (filedoes not exist)我後來又裝了 ncdf 後就可以了!! 這是說明書沒寫到的..

Links booklink

Contact Us: admin [ a t ] ucptt.com