Running 'testthat.R' [30s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(SDMtune)
  
     _____  ____   __  ___ __
    / ___/ / __ \ /  |/  // /_ __  __ ____   ___
    \__ \ / / / // /|_/ // __// / / // __ \ / _ \
   ___/ // /_/ // /  / // /_ / /_/ // / / //  __/
  /____//_____//_/  /_/ \__/ \__,_//_/ /_/ \___/  version 1.1.5
  
  To cite this package in publications type: citation("SDMtune").
  > 
  > test_check("SDMtune")
  == Skipped tests ===============================================================
  * On CRAN (31)
  
  == Failed tests ================================================================
  -- Error (test-plotPA.R:10:3): The values are correct and the file is saved with correct format --
  Error in `(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("RasterLayer", package = "raster"), "integer"), 
      new("standardGeneric", .Data = function (object, cell, ...) 
      standardGeneric("xyFromCell"), generic = structure("xyFromCell", package = "terra"), 
          package = "terra", group = list(), valueClass = character(0), 
          signature = c("object", "cell"), default = NULL, skeleton = (function (object, 
              cell, ...) 
          stop("invalid call in method dispatch to 'xyFromCell' (no default method)", 
              domain = NA))(object, cell, ...)), <environment>)`: unable to find an inherited method for function 'xyFromCell' for signature '"RasterLayer", "integer"'
  Backtrace:
      x
   1. \-SDMtune::plotPA(map, th = 0.8, filename = file, format = "ascii") test-plotPA.R:10:2
   2.   +-rasterVis::gplot(pa, maxpixels = maxpixels)
   3.   \-rasterVis::gplot(pa, maxpixels = maxpixels)
   4.     \-rasterVis:::.local(x, ...)
   5.       \-rasterVis:::.gplot(x, ...)
   6.         \-terra::xyFromCell(x, seq_len(ncell(x)))
   7.           \-(function (classes, fdef, mtable) ...
  -- Error (test-plotPred.R:9:3): The values are correct -------------------------
  Error in `(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("RasterLayer", package = "raster"), "integer"), 
      new("standardGeneric", .Data = function (object, cell, ...) 
      standardGeneric("xyFromCell"), generic = structure("xyFromCell", package = "terra"), 
          package = "terra", group = list(), valueClass = character(0), 
          signature = c("object", "cell"), default = NULL, skeleton = (function (object, 
              cell, ...) 
          stop("invalid call in method dispatch to 'xyFromCell' (no default method)", 
              domain = NA))(object, cell, ...)), <environment>)`: unable to find an inherited method for function 'xyFromCell' for signature '"RasterLayer", "integer"'
  Backtrace:
      x
   1. \-SDMtune::plotPred(map) test-plotPred.R:9:2
   2.   +-rasterVis::gplot(map, maxpixels = maxpixels)
   3.   \-rasterVis::gplot(map, maxpixels = maxpixels)
   4.     \-rasterVis:::.local(x, ...)
   5.       \-rasterVis:::.gplot(x, ...)
   6.         \-terra::xyFromCell(x, seq_len(ncell(x)))
   7.           \-(function (classes, fdef, mtable) ...
  
  [ FAIL 2 | WARN 82 | SKIP 31 | PASS 357 ]
  Error: Test failures
  Execution halted