在 R 中运行预测函数时出错

问题描述 投票:0回答:0

我目前正在使用 SDM 包在 R 中运行物种分布模型。 这是代码片段;

lst <-list.files (path="All_variables/",pattern='.asc$', all.files = TRUE, full.names = T)
preds<- stack(lst)
plot(preds[[2]])

ex<-raster ::extract (preds,spg)
head(ex)
v<-usdm::vifstep(ex)
preds<-usdm::exclude(preds, v)
preds

d <- sdmData(species~., spg, predictors= preds, bg = list(method='gRandom',n=1000))
d
getmethodNames()
m <- sdm(species~., d, methods=c('glm','gam','rf','gbm'), replication=c('sub','boot'),
         test.p=30,n=3, parallelSetting=list(ncore=4,method='parallel'))
m
m

gui(m)
p1<- predict(m, preds, filename = 'pr.img', overwrite=TRUE)

然而,每次我运行最后一行时,我都会得到这个错误;

Error in .updateGDAL(object, v, cell, band, setminmax) : 
  no longer supported

有人能帮帮我吗?

我试过用谷歌搜索这个错误,但没有成功。

r gdal
© www.soinside.com 2019 - 2024. All rights reserved.