当我尝试重现光栅参考手册中给出的stack()示例时,出现以下错误:
R> fn <- system.file("external/test.grd", package="raster")
R> s <- stack(fn, fn)
Error in rep.int(names(x), lengths(x)) :
unimplemented type 'NULL' in 'rep3'
或者如果我尝试:
R> fn <- system.file("external/test.grd", package="raster")
R> r <- raster(fn)
R> s <- stack(r, fn)
Error in as.list.default(x) :
no method for coercing this S4 class to a vector
有人有想法吗?!