对于堆叠物种分布模型,sort.list(y)出错

时间:2018-01-23 13:31:27

标签: r dataframe models bioinformatics

我目前正在尝试使用“SSDM”软件包通过高性能集群运行堆叠物种分布模型。我目前正在使用'stack_modelling'功能。我的代码如下:

      Env <- load_var(path = getwd(), files = NULL, format = c(".grd", ".tif", ".asc",
                                                     ".sdat", ".rst", ".nc", ".envi", ".bil", ".img"), categorical = "af_anthrome.asc",
            Norm = TRUE, tmp = TRUE, verbose = TRUE, GUI = FALSE)

    Occurrences <- load_occ(path = getwd(), Env, file = "Final_African_bird_occurrence_rarefied_points.csv", 
                    Xcol = "decimallong", Ycol = "decimallat", Spcol = "species", GeoRes = FALSE,
                    sep = ",", verbose = TRUE, GUI = FALSE)

    stack <- stack_modelling(c("GLM", "GAM", "MARS", "GBM", "RF", "CTA", "MAXENT", "ANN", "SVM"), Occurrences, Env, Xcol = "Xcol",
            Ycol = "Xcol", Pcol = NULL, Spcol = "Spcol", rep = 1,
            name = "Stack", save = TRUE, path = getwd(), PA = NULL,
            cv = "holdout", cv.param = c(0.75, 1), thresh = 1001,
            axes.metric = "Pearson", uncertainty = TRUE, tmp = TRUE,
            ensemble.metric = c("AUC"), ensemble.thresh = c(0.75), weight = TRUE,
            method = "bSSDM", metric = "TSS", rep.B = 1000, range = NULL,
            endemism = NULL, verbose = TRUE, GUI = FALSE, cores = 500)

然而,在提交作业后不久,我收到了以下错误消息:

    Occurrences loading 
    Error in sort.list(y) : 'x' must be atomic for 'sort.list'
    Have you called 'sort' on a list?
    Calls: load_occ -> as.factor -> as.factor -> factor -> sort.list
    Execution halted

我尝试使用我的一小部分数据来运行此分析,并且我确实将代码运行到#Ensemble Models Creation#阶段,然后我会收到相同的消息。

这与我的出现文件有关吗?我的出现被R读取并识别,当我使用'as.data.frame'命令将文件转换为数据帧时,仍然会出现相同的错误消息。

感谢您的帮助, Nikhail

0 个答案:

没有答案