在数据框中选择了未定义的列

时间:2018-10-02 15:57:14

标签: dataframe

我正在尝试为在 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

0 个答案:

没有答案