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

看板R_Language作者 (tai)時間11年前 (2013/12/16 00:20), 編輯推噓1(108)
留言9則, 2人參與, 最新討論串1/1
各位大大好 我想利用 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

12/16 00:31, , 1F
有沒有安裝rgdal後的錯誤訊息?另外cat只是訊息沒有功能
12/16 00:31, 1F

12/16 01:00, , 2F
In library(package, lib.loc = lib.loc, character.only =
12/16 01:00, 2F

12/16 01:00, , 3F
TRUE, logical.return = TRUE, :
12/16 01:00, 3F

12/16 01:01, , 4F
there is no package called ‘ncdf’
12/16 01:01, 4F

12/16 01:01, , 5F
Error in .rasterObjectFromFile(x, objecttype = "RasterBr
12/16 01:01, 5F

12/16 01:01, , 6F
ick", ...) :
12/16 01:01, 6F

12/16 01:02, , 7F
Cannot create a RasterLayer object from this file. (file
12/16 01:02, 7F

12/16 01:02, , 8F
does not exist)
12/16 01:02, 8F

12/16 01:03, , 9F
我後來又裝了 ncdf 後就可以了!! 這是說明書沒寫到的..
12/16 01:03, 9F
文章代碼(AID): #1IhTR6FH (R_Language)
文章代碼(AID): #1IhTR6FH (R_Language)