[问题] 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