CRAN Package Check Results for Package SSDM

Last updated on 2019-05-30 11:56:30 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.2.4 25.04 203.76 228.80 ERROR
r-devel-linux-x86_64-debian-gcc 0.2.4 21.99 156.28 178.27 ERROR
r-devel-linux-x86_64-fedora-clang 0.2.4 270.97 ERROR
r-devel-linux-x86_64-fedora-gcc 0.2.4 272.44 ERROR
r-devel-windows-ix86+x86_64 0.2.4 56.00 288.00 344.00 ERROR
r-patched-linux-x86_64 0.2.4 26.04 199.68 225.72 ERROR
r-patched-solaris-x86 0.2.4 387.70 ERROR
r-release-linux-x86_64 0.2.4 26.00 201.19 227.19 ERROR
r-release-windows-ix86+x86_64 0.2.4 4.00 6.00 10.00 ERROR
r-release-osx-x86_64 0.2.4 NOTE
r-oldrel-windows-ix86+x86_64 0.2.4 50.00 272.00 322.00 ERROR
r-oldrel-osx-x86_64 0.2.4 NOTE

Check Details

Version: 0.2.4
Check: tests
Result: ERROR
     Running 'testthat.R' [38s/42s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(SSDM)
     Welcome to the SSDM package, you can launch the graphical user interface by typing gui() in the console.
     >
     > test_check("SSDM")
     -- 1. Error: ensemble function (@test_ensemble.R#7) ---------------------------
     subscript out of bounds
     1: modelling("SVM", Occurrences, Env, Xcol = "LONGITUDE", Ycol = "LATITUDE", select.thresh = 0,
     verbose = FALSE) at testthat/test_ensemble.R:7
     2: project(model, Env, ...)
     3: project(model, Env, ...)
     4: suppressWarnings(raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     }))
     5: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
     6: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     7: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     8: .local(object, ...)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     -- 2. Error: ensemble modelling function (@test_ensemble_modelling.R#5) -------
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "MARS"), Occurrences, Env, rep = 1, Xcol = "LONGITUDE",
     Ycol = "LATITUDE", ensemble.thresh = c(0), verbose = FALSE) at testthat/test_ensemble_modelling.R:5
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     -- 3. Failure: stack modelling function (@test_stack_modelling.R#8) -----------
     `SSDM` inherits from `NULL` not `Stacked.SDM`.
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     -- 4. Error: stacking function (@test_stacking.R#6) ---------------------------
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "SVM"), Occ1, Env, rep = 1, Xcol = "LONGITUDE", Ycol = "LATITUDE",
     name = "elliptica", ensemble.thresh = 0, verbose = FALSE) at testthat/test_stacking.R:6
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(name = "elliptica", thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     == testthat results ===========================================================
     OK: 43 SKIPPED: 0 WARNINGS: 15 FAILED: 4
     1. Error: ensemble function (@test_ensemble.R#7)
     2. Error: ensemble modelling function (@test_ensemble_modelling.R#5)
     3. Failure: stack modelling function (@test_stack_modelling.R#8)
     4. Error: stacking function (@test_stacking.R#6)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.2.4
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'GUI.Rmd' using rmarkdown
    --- finished re-building 'GUI.Rmd'
    
    --- re-building 'SSDM.Rmd' using rmarkdown
    Quitting from lines 92-96 (SSDM.Rmd)
    Error: processing vignette 'SSDM.Rmd' failed with diagnostics:
    unable to find an inherited method for function 'ensemble' for signature '"missing"'
    --- failed re-building 'SSDM.Rmd'
    
    SUMMARY: processing the following file failed:
     'SSDM.Rmd'
    
    Error: Vignette re-building failed.
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64, r-release-linux-x86_64

Version: 0.2.4
Check: tests
Result: ERROR
     Running ‘testthat.R’ [26s/38s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(SSDM)
     Welcome to the SSDM package, you can launch the graphical user interface by typing gui() in the console.
     >
     > test_check("SSDM")
     ── 1. Error: ensemble function (@test_ensemble.R#7) ───────────────────────────
     subscript out of bounds
     1: modelling("SVM", Occurrences, Env, Xcol = "LONGITUDE", Ycol = "LATITUDE", select.thresh = 0,
     verbose = FALSE) at testthat/test_ensemble.R:7
     2: project(model, Env, ...)
     3: project(model, Env, ...)
     4: suppressWarnings(raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     }))
     5: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
     6: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     7: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     8: .local(object, ...)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 2. Error: ensemble modelling function (@test_ensemble_modelling.R#5) ───────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "MARS"), Occurrences, Env, rep = 1, Xcol = "LONGITUDE",
     Ycol = "LATITUDE", ensemble.thresh = c(0), verbose = FALSE) at testthat/test_ensemble_modelling.R:5
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     ── 3. Failure: stack modelling function (@test_stack_modelling.R#8) ───────────
     `SSDM` inherits from `NULL` not `Stacked.SDM`.
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 4. Error: stacking function (@test_stacking.R#6) ───────────────────────────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "SVM"), Occ1, Env, rep = 1, Xcol = "LONGITUDE", Ycol = "LATITUDE",
     name = "elliptica", ensemble.thresh = 0, verbose = FALSE) at testthat/test_stacking.R:6
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(name = "elliptica", thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 43 SKIPPED: 0 WARNINGS: 15 FAILED: 4
     1. Error: ensemble function (@test_ensemble.R#7)
     2. Error: ensemble modelling function (@test_ensemble_modelling.R#5)
     3. Failure: stack modelling function (@test_stack_modelling.R#8)
     4. Error: stacking function (@test_stacking.R#6)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.2.4
Check: dependencies in R code
Result: NOTE
    Namespace in Imports field not imported from: ‘shinyFiles’
     All declared Imports should be used.
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86, r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.2.4
Check: tests
Result: ERROR
     Running ‘testthat.R’ [39s/43s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(SSDM)
     Welcome to the SSDM package, you can launch the graphical user interface by typing gui() in the console.
     >
     > test_check("SSDM")
     ── 1. Error: ensemble function (@test_ensemble.R#7) ───────────────────────────
     subscript out of bounds
     1: modelling("SVM", Occurrences, Env, Xcol = "LONGITUDE", Ycol = "LATITUDE", select.thresh = 0,
     verbose = FALSE) at testthat/test_ensemble.R:7
     2: project(model, Env, ...)
     3: project(model, Env, ...)
     4: suppressWarnings(raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     }))
     5: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
     6: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     7: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     8: .local(object, ...)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 2. Error: ensemble modelling function (@test_ensemble_modelling.R#5) ───────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "MARS"), Occurrences, Env, rep = 1, Xcol = "LONGITUDE",
     Ycol = "LATITUDE", ensemble.thresh = c(0), verbose = FALSE) at testthat/test_ensemble_modelling.R:5
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     ── 3. Failure: stack modelling function (@test_stack_modelling.R#8) ───────────
     `SSDM` inherits from `NULL` not `Stacked.SDM`.
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 4. Error: stacking function (@test_stacking.R#6) ───────────────────────────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "SVM"), Occ1, Env, rep = 1, Xcol = "LONGITUDE", Ycol = "LATITUDE",
     name = "elliptica", ensemble.thresh = 0, verbose = FALSE) at testthat/test_stacking.R:6
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(name = "elliptica", thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 43 SKIPPED: 0 WARNINGS: 15 FAILED: 4
     1. Error: ensemble function (@test_ensemble.R#7)
     2. Error: ensemble modelling function (@test_ensemble_modelling.R#5)
     3. Failure: stack modelling function (@test_stack_modelling.R#8)
     4. Error: stacking function (@test_stacking.R#6)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.2.4
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘GUI.Rmd’ using rmarkdown
    --- finished re-building ‘GUI.Rmd’
    
    --- re-building ‘SSDM.Rmd’ using rmarkdown
    Quitting from lines 92-96 (SSDM.Rmd)
    Error: processing vignette 'SSDM.Rmd' failed with diagnostics:
    unable to find an inherited method for function 'ensemble' for signature '"missing"'
    --- failed re-building ‘SSDM.Rmd’
    
    SUMMARY: processing the following file failed:
     ‘SSDM.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-ix86+x86_64

Version: 0.2.4
Check: tests
Result: ERROR
     Running ‘testthat.R’ [42s/106s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(SSDM)
     Welcome to the SSDM package, you can launch the graphical user interface by typing gui() in the console.
     >
     > test_check("SSDM")
     ── 1. Error: ensemble function (@test_ensemble.R#7) ───────────────────────────
     subscript out of bounds
     1: modelling("SVM", Occurrences, Env, Xcol = "LONGITUDE", Ycol = "LATITUDE", select.thresh = 0,
     verbose = FALSE) at testthat/test_ensemble.R:7
     2: project(model, Env, ...)
     3: project(model, Env, ...)
     4: suppressWarnings(raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     }))
     5: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
     6: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     7: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     8: .local(object, ...)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 2. Error: ensemble modelling function (@test_ensemble_modelling.R#5) ───────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "MARS"), Occurrences, Env, rep = 1, Xcol = "LONGITUDE",
     Ycol = "LATITUDE", ensemble.thresh = c(0), verbose = FALSE) at testthat/test_ensemble_modelling.R:5
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     ── 3. Failure: stack modelling function (@test_stack_modelling.R#8) ───────────
     `SSDM` inherits from `NULL` not `Stacked.SDM`.
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 4. Error: stacking function (@test_stacking.R#6) ───────────────────────────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "SVM"), Occ1, Env, rep = 1, Xcol = "LONGITUDE", Ycol = "LATITUDE",
     name = "elliptica", ensemble.thresh = 0, verbose = FALSE) at testthat/test_stacking.R:6
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(name = "elliptica", thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 43 SKIPPED: 0 WARNINGS: 15 FAILED: 4
     1. Error: ensemble function (@test_ensemble.R#7)
     2. Error: ensemble modelling function (@test_ensemble_modelling.R#5)
     3. Failure: stack modelling function (@test_stack_modelling.R#8)
     4. Error: stacking function (@test_stacking.R#6)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.2.4
Check: tests
Result: ERROR
     Running 'testthat.R' [43s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(SSDM)
     Welcome to the SSDM package, you can launch the graphical user interface by typing gui() in the console.
     >
     > test_check("SSDM")
     -- 1. Error: ensemble function (@test_ensemble.R#7) ---------------------------
     subscript out of bounds
     1: modelling("SVM", Occurrences, Env, Xcol = "LONGITUDE", Ycol = "LATITUDE", select.thresh = 0,
     verbose = FALSE) at testthat/test_ensemble.R:7
     2: project(model, Env, ...)
     3: project(model, Env, ...)
     4: suppressWarnings(raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     }))
     5: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
     6: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     7: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     8: .local(object, ...)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     -- 2. Error: ensemble modelling function (@test_ensemble_modelling.R#5) -------
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "MARS"), Occurrences, Env, rep = 1, Xcol = "LONGITUDE",
     Ycol = "LATITUDE", ensemble.thresh = c(0), verbose = FALSE) at testthat/test_ensemble_modelling.R:5
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     -- 3. Failure: stack modelling function (@test_stack_modelling.R#8) -----------
     `SSDM` inherits from `NULL` not `Stacked.SDM`.
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     -- 4. Error: stacking function (@test_stacking.R#6) ---------------------------
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "SVM"), Occ1, Env, rep = 1, Xcol = "LONGITUDE", Ycol = "LATITUDE",
     name = "elliptica", ensemble.thresh = 0, verbose = FALSE) at testthat/test_stacking.R:6
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(name = "elliptica", thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     == testthat results ===========================================================
     OK: 43 SKIPPED: 0 WARNINGS: 15 FAILED: 4
     1. Error: ensemble function (@test_ensemble.R#7)
     2. Error: ensemble modelling function (@test_ensemble_modelling.R#5)
     3. Failure: stack modelling function (@test_stack_modelling.R#8)
     4. Error: stacking function (@test_stacking.R#6)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 0.2.4
Check: tests
Result: ERROR
     Running ‘testthat.R’ [35s/39s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(SSDM)
     Welcome to the SSDM package, you can launch the graphical user interface by typing gui() in the console.
     >
     > test_check("SSDM")
     ── 1. Error: ensemble function (@test_ensemble.R#7) ───────────────────────────
     subscript out of bounds
     1: modelling("SVM", Occurrences, Env, Xcol = "LONGITUDE", Ycol = "LATITUDE", select.thresh = 0,
     verbose = FALSE) at testthat/test_ensemble.R:7
     2: project(model, Env, ...)
     3: project(model, Env, ...)
     4: suppressWarnings(raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     }))
     5: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
     6: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     7: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     8: .local(object, ...)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 2. Error: ensemble modelling function (@test_ensemble_modelling.R#5) ───────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "MARS"), Occurrences, Env, rep = 1, Xcol = "LONGITUDE",
     Ycol = "LATITUDE", ensemble.thresh = c(0), verbose = FALSE) at testthat/test_ensemble_modelling.R:5
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     ── 3. Failure: stack modelling function (@test_stack_modelling.R#8) ───────────
     `SSDM` inherits from `NULL` not `Stacked.SDM`.
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 4. Error: stacking function (@test_stacking.R#6) ───────────────────────────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "SVM"), Occ1, Env, rep = 1, Xcol = "LONGITUDE", Ycol = "LATITUDE",
     name = "elliptica", ensemble.thresh = 0, verbose = FALSE) at testthat/test_stacking.R:6
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(name = "elliptica", thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 43 SKIPPED: 0 WARNINGS: 15 FAILED: 4
     1. Error: ensemble function (@test_ensemble.R#7)
     2. Error: ensemble modelling function (@test_ensemble_modelling.R#5)
     3. Failure: stack modelling function (@test_stack_modelling.R#8)
     4. Error: stacking function (@test_stacking.R#6)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-patched-linux-x86_64

Version: 0.2.4
Check: tests
Result: ERROR
     Running ‘testthat.R’ [47s/53s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(SSDM)
     Welcome to the SSDM package, you can launch the graphical user interface by typing gui() in the console.
     >
     > test_check("SSDM")
     ── 1. Error: ensemble function (@test_ensemble.R#7) ───────────────────────────
     subscript out of bounds
     1: modelling("SVM", Occurrences, Env, Xcol = "LONGITUDE", Ycol = "LATITUDE", select.thresh = 0,
     verbose = FALSE) at testthat/test_ensemble.R:7
     2: project(model, Env, ...)
     3: project(model, Env, ...)
     4: suppressWarnings(raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     }))
     5: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
     6: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     7: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     8: .local(object, ...)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 2. Error: ensemble modelling function (@test_ensemble_modelling.R#5) ───────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "MARS"), Occurrences, Env, rep = 1, Xcol = "LONGITUDE",
     Ycol = "LATITUDE", ensemble.thresh = c(0), verbose = FALSE) at testthat/test_ensemble_modelling.R:5
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     ── 3. Failure: stack modelling function (@test_stack_modelling.R#8) ───────────
     `SSDM` inherits from `NULL` not `Stacked.SDM`.
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 4. Error: stacking function (@test_stacking.R#6) ───────────────────────────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "SVM"), Occ1, Env, rep = 1, Xcol = "LONGITUDE", Ycol = "LATITUDE",
     name = "elliptica", ensemble.thresh = 0, verbose = FALSE) at testthat/test_stacking.R:6
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(name = "elliptica", thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 43 SKIPPED: 0 WARNINGS: 15 FAILED: 4
     1. Error: ensemble function (@test_ensemble.R#7)
     2. Error: ensemble modelling function (@test_ensemble_modelling.R#5)
     3. Failure: stack modelling function (@test_stack_modelling.R#8)
     4. Error: stacking function (@test_stacking.R#6)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-patched-solaris-x86

Version: 0.2.4
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building ‘GUI.Rmd’ using rmarkdown
    Warning in engine$weave(file, quiet = quiet, encoding = enc) :
     Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1.
    --- finished re-building ‘GUI.Rmd’
    
    --- re-building ‘SSDM.Rmd’ using rmarkdown
    Warning in engine$weave(file, quiet = quiet, encoding = enc) :
     Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1.
    Quitting from lines 92-96 (SSDM.Rmd)
    Error: processing vignette 'SSDM.Rmd' failed with diagnostics:
    unable to find an inherited method for function 'ensemble' for signature '"missing"'
    --- failed re-building ‘SSDM.Rmd’
    
    SUMMARY: processing the following file failed:
     ‘SSDM.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-patched-solaris-x86

Version: 0.2.4
Check: tests
Result: ERROR
     Running ‘testthat.R’ [36s/39s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(SSDM)
     Welcome to the SSDM package, you can launch the graphical user interface by typing gui() in the console.
     >
     > test_check("SSDM")
     ── 1. Error: ensemble function (@test_ensemble.R#7) ───────────────────────────
     subscript out of bounds
     1: modelling("SVM", Occurrences, Env, Xcol = "LONGITUDE", Ycol = "LATITUDE", select.thresh = 0,
     verbose = FALSE) at testthat/test_ensemble.R:7
     2: project(model, Env, ...)
     3: project(model, Env, ...)
     4: suppressWarnings(raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     }))
     5: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
     6: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     7: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     8: .local(object, ...)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 2. Error: ensemble modelling function (@test_ensemble_modelling.R#5) ───────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "MARS"), Occurrences, Env, rep = 1, Xcol = "LONGITUDE",
     Ycol = "LATITUDE", ensemble.thresh = c(0), verbose = FALSE) at testthat/test_ensemble_modelling.R:5
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     ── 3. Failure: stack modelling function (@test_stack_modelling.R#8) ───────────
     `SSDM` inherits from `NULL` not `Stacked.SDM`.
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     ── 4. Error: stacking function (@test_stacking.R#6) ───────────────────────────
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "SVM"), Occ1, Env, rep = 1, Xcol = "LONGITUDE", Ycol = "LATITUDE",
     name = "elliptica", ensemble.thresh = 0, verbose = FALSE) at testthat/test_stacking.R:6
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(name = "elliptica", thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 43 SKIPPED: 0 WARNINGS: 15 FAILED: 4
     1. Error: ensemble function (@test_ensemble.R#7)
     2. Error: ensemble modelling function (@test_ensemble_modelling.R#5)
     3. Failure: stack modelling function (@test_stack_modelling.R#8)
     4. Error: stacking function (@test_stacking.R#6)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-release-linux-x86_64

Version: 0.2.4
Check: whether package can be installed
Result: ERROR
    Installation failed.
Flavor: r-release-windows-ix86+x86_64

Version: 0.2.4
Check: tests
Result: ERROR
     Running 'testthat.R' [46s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(SSDM)
     Welcome to the SSDM package, you can launch the graphical user interface by typing gui() in the console.
     >
     > test_check("SSDM")
     -- 1. Error: ensemble function (@test_ensemble.R#7) ---------------------------
     subscript out of bounds
     1: modelling("SVM", Occurrences, Env, Xcol = "LONGITUDE", Ycol = "LATITUDE", select.thresh = 0,
     verbose = FALSE) at testthat/test_ensemble.R:7
     2: project(model, Env, ...)
     3: project(model, Env, ...)
     4: suppressWarnings(raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     }))
     5: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
     6: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     7: raster::predict(Env, model, fun = function(model, x) {
     x = as.data.frame(x)
     for (i in seq_len(length(Env@layers))) {
     if (Env[[i]]@data@isfactor) {
     x[, i] = as.factor(x[, i])
     x[, i] = droplevels(x[, i])
     levels(x[, i]) = Env[[i]]@data@attributes[[1]]$ID
     }
     }
     return(predict(model, x))
     })
     8: .local(object, ...)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     -- 2. Error: ensemble modelling function (@test_ensemble_modelling.R#5) -------
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "MARS"), Occurrences, Env, rep = 1, Xcol = "LONGITUDE",
     Ycol = "LATITUDE", ensemble.thresh = c(0), verbose = FALSE) at testthat/test_ensemble_modelling.R:5
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     Error in (function (classes, fdef, mtable) :
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     -- 3. Failure: stack modelling function (@test_stack_modelling.R#8) -----------
     `SSDM` inherits from `NULL` not `Stacked.SDM`.
    
     Error in factors[[j]] : subscript out of bounds
     Error in factors[[j]] : subscript out of bounds
     -- 4. Error: stacking function (@test_stacking.R#6) ---------------------------
     unable to find an inherited method for function 'ensemble' for signature '"missing"'
     1: ensemble_modelling(c("CTA", "SVM"), Occ1, Env, rep = 1, Xcol = "LONGITUDE", Ycol = "LATITUDE",
     name = "elliptica", ensemble.thresh = 0, verbose = FALSE) at testthat/test_stacking.R:6
     2: do.call(ensemble, algo)
     3: (new("nonstandardGenericFunction", .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"),
     ensemble.thresh = c(0.75), weight = TRUE, thresh = 1001, uncertainty = TRUE,
     verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)))(name = "elliptica", thresh = 1001, uncertainty = TRUE, ensemble.metric = "AUC",
     ensemble.thresh = 0, weight = TRUE, verbose = FALSE)
     4: (function (classes, fdef, mtable)
     {
     methods <- .findInheritedMethods(classes, fdef, mtable)
     if (length(methods) == 1L)
     return(methods[[1L]])
     else if (length(methods) == 0L) {
     cnames <- paste0("\"", vapply(classes, as.character, ""), "\"", collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
     }
     else stop("Internal error in finding inherited methods; didn't return a unique method",
     domain = NA)
     })(list(structure("missing", package = "methods")), new("nonstandardGenericFunction",
     .Data = function (x, ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     {
     return(standardGeneric("ensemble"))
     }, generic = structure("ensemble", package = "SSDM"), package = "SSDM", group = list(),
     valueClass = character(0), signature = c("x", "name", "ensemble.metric", "ensemble.thresh",
     "weight", "thresh", "uncertainty", "verbose", "GUI"), default = NULL, skeleton = (function (x,
     ..., name = NULL, ensemble.metric = c("AUC"), ensemble.thresh = c(0.75),
     weight = TRUE, thresh = 1001, uncertainty = TRUE, verbose = TRUE, GUI = FALSE)
     stop("invalid call in method dispatch to 'ensemble' (no default method)", domain = NA))(x,
     ..., name = name, ensemble.metric = ensemble.metric, ensemble.thresh = ensemble.thresh,
     weight = weight, thresh = thresh, uncertainty = uncertainty, verbose = verbose,
     GUI = GUI)), <environment>)
     5: stop(gettextf("unable to find an inherited method for function %s for signature %s",
     sQuote(fdef@generic), sQuote(cnames)), domain = NA)
    
     == testthat results ===========================================================
     OK: 43 SKIPPED: 0 WARNINGS: 15 FAILED: 4
     1. Error: ensemble function (@test_ensemble.R#7)
     2. Error: ensemble modelling function (@test_ensemble_modelling.R#5)
     3. Failure: stack modelling function (@test_stack_modelling.R#8)
     4. Error: stacking function (@test_stacking.R#6)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 0.2.4
Check: re-building of vignette outputs
Result: WARN
    Error in re-building vignettes:
     ...
    Quitting from lines 92-96 (SSDM.Rmd)
    Error: processing vignette 'SSDM.Rmd' failed with diagnostics:
    unable to find an inherited method for function 'ensemble' for signature '"missing"'
    Execution halted
Flavor: r-oldrel-windows-ix86+x86_64