作者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
1F:推 ccwang002:有没有安装rgdal後的错误讯息?另外cat只是讯息没有功能 12/16 00:31
2F:→ tai34:In library(package, lib.loc = lib.loc, character.only = 12/16 01:00
3F:→ tai34:TRUE, logical.return = TRUE, : 12/16 01:00
4F:→ tai34: there is no package called ‘ncdf’ 12/16 01:01
5F:→ tai34:Error in .rasterObjectFromFile(x, objecttype = "RasterBr 12/16 01:01
6F:→ tai34:ick", ...) : 12/16 01:01
7F:→ tai34:Cannot create a RasterLayer object from this file. (file 12/16 01:02
8F:→ tai34:does not exist) 12/16 01:02
9F:→ tai34:我後来又装了 ncdf 後就可以了!! 这是说明书没写到的.. 12/16 01:03