我正在尝试为在 MaxEnt 软件中创建的数据创建阈值。我在数据框中遇到了以下错误:
('[[
[.data.frame
中的错误(DATA,2):未定义的列已选中)
运行此阈值行时:
library(PresenceAbsence)
pp <- presence$Logistic.prediction
bb <- background$logistic
prediction <- c(pp, bb, pp) ## NOTE: ADDING PRESENCES AS BACKGROUND PREDICTION!!
rhodiola <- c(rep(1,length(pp)),rep(0,length(bb)),rep(0,length(pp))) ## labels: 1=present, 0=background
test.df <- data.frame(cbind(as.numeric(c(1:length(prediction))), rhodiola, prediction))
thresh <- as.numeric(optimal.thresholds(test.df, opt.methods="MeanProb")[2]) #get error saying undefined columns selected