在 terra 包中读取多个栅格
Reading in multiple rasters in terra package
我正在更改我的空间工作流程以使用 terra 包而不是栅格包。使用光栅包,我曾经将多个光栅直接读入堆栈。
filelist_temp <- list.files(datapath("Climate/World Clim 1 yr Monthly Weather/LCC June and July/June"), full.names = TRUE)
temp_rasters <- stack(filelist_temp)
有没有简单的方法可以在terra中做同样的操作?
这是我最初想出的办法,但行不通。我最终得到了一个包含 25 个 spatRasters
的列表
temp_rasters <- c(lapply(filelist_temp, rast))
比我想象的要简单
temp_rasters <- rast(filelist_temp)
我正在更改我的空间工作流程以使用 terra 包而不是栅格包。使用光栅包,我曾经将多个光栅直接读入堆栈。
filelist_temp <- list.files(datapath("Climate/World Clim 1 yr Monthly Weather/LCC June and July/June"), full.names = TRUE)
temp_rasters <- stack(filelist_temp)
有没有简单的方法可以在terra中做同样的操作?
这是我最初想出的办法,但行不通。我最终得到了一个包含 25 个 spatRasters
的列表temp_rasters <- c(lapply(filelist_temp, rast))
比我想象的要简单
temp_rasters <- rast(filelist_temp)