作者tai34 (tai)
看板R_Language
標題[問題] R 如何讀圖層 (raster)
時間Mon Dec 16 00:20:20 2013
各位大大好
我想利用 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...')內的...真的只要打...就好了嗎?
謝謝各位大大
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.116.1.136
推 ccwang002:有沒有安裝rgdal後的錯誤訊息?另外cat只是訊息沒有功能 12/16 00:31
→ tai34:In library(package, lib.loc = lib.loc, character.only = 12/16 01:00
→ tai34:TRUE, logical.return = TRUE, : 12/16 01:00
→ tai34: there is no package called ‘ncdf’ 12/16 01:01
→ tai34:Error in .rasterObjectFromFile(x, objecttype = "RasterBr 12/16 01:01
→ tai34:ick", ...) : 12/16 01:01
→ tai34:Cannot create a RasterLayer object from this file. (file 12/16 01:02
→ tai34:does not exist) 12/16 01:02
→ tai34:我後來又裝了 ncdf 後就可以了!! 這是說明書沒寫到的.. 12/16 01:03