Running ‘testthat.R’ [180s/192s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(landscapemetrics)
  > 
  > test_check("landscapemetrics")
  
  > Progress 'various' metrics:  1 / 2 - Current metric:  lsm_p_enn  
  > Progress 'various' metrics:  2 / 2 - Current metric:  lsm_c_ed  
  > Progress 'various' metrics:  1 / 1 - Current metric:  lsm_l_ta  
  > Progress 'various' metrics:  1 / 1 - Current metric:  lsm_l_ta  
  > Progress 'various' metrics:  1 / 1 - Current metric:  lsm_l_ta  
  > Progress 'various' metrics:  1 / 1 - Current metric:  lsm_l_ta  
  > Progress 'various' metrics:  1 / 1 - Current metric:  lsm_l_ta  
  > Progress 'various' metrics:  1 / 1 - Current metric:  lsm_l_ta  
  > Progress 'various' metrics:  1 / 1 - Current metric:  lsm_l_ta  ── 1. Error: (unknown) (@test-show-correlation.R#6)  ───────────────────────────
  first argument ('table') not of type VECSXP, R_HashSizeCheck
  1: calculate_lsm(landscape, what = "class") at testthat/test-show-correlation.R:6
  2: calculate_lsm.RasterLayer(landscape, what = "class")
  3: lapply(X = raster::as.list(landscape), FUN = calculate_lsm_internal, what = what, 
         directions = directions, count_boundary = count_boundary, consider_boundary = consider_boundary, 
         edge_depth = edge_depth, classes_max = classes_max, neighbourhood = neighbourhood, 
         ordered = ordered, base = base, full_name = full_name, verbose = verbose, progress = progress)
  4: FUN(X[[i]], ...)
  5: lapply(seq_along(namespace_class), FUN = function(current_metric) {
         if (isTRUE(progress)) {
             cat("\r> Progress 'class' metrics: ", current_metric, "/", length(namespace_class), 
                 "- Current metric: ", namespace_class[[current_metric]], " ")
         }
         foo <- match.fun(namespace_class[[current_metric]])
         arguments <- names(formals(foo))
         do.call(what = foo, args = mget(arguments, envir = parent.env(environment())))
     })
  6: FUN(X[[i]], ...)
  7: do.call(what = foo, args = mget(arguments, envir = parent.env(environment())))
  8: (function (landscape, directions) 
     UseMethod("lsm_c_mesh"))(landscape = new("RasterLayer", file = new(".RasterFile", 
         name = "", datanotation = "FLT4S", byteorder = "little", nodatavalue = -Inf, 
         NAchanged = FALSE, nbands = 1L, bandorder = "BIL", offset = 0L, toptobottom = TRUE, 
         blockrows = 0L, blockcols = 0L, driver = "", open = FALSE), data = new(".SingleLayerData", 
         values = c(1L, 3L, 3L, 3L, 3L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
         3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 3L, 3L, 2L, 2L, 3L, 
         3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 3L, 3L, 3L, 3L, 
         3L, 3L, 3L, 2L, 2L, 3L, 3L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
         1L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 3L, 2L, 2L, 3L, 3L, 
         3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 
         3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 
         3L, 3L, 3L, 3L, 3L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 
         3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 1L, 1L, 1L, 
         1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 
         3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 
         2L, 2L, 2L, 1L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 1L, 1L, 
         3L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 
         3L, 3L, 3L, 3L, 3L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 
         2L, 2L, 2L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 3L, 3L, 3L, 
         3L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 
         3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 
         2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 3L, 3L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 
         1L, 1L, 1L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
         3L, 3L, 2L, 2L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 
         3L, 3L, 3L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 3L, 3L, 1L, 1L, 
         1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 
         3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 3L, 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2L, 
         2L, 2L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 3L, 3L, 3L, 
         2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
         3L, 3L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 
         3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 3L, 3L, 2L, 3L, 2L, 3L, 3L, 3L, 2L, 2L, 
         2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 3L, 3L, 3L, 1L, 3L, 3L, 3L, 2L, 2L, 2L, 
         2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 
         3L, 2L, 2L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 
         3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 3L, 3L, 3L, 3L, 3L, 2L, 
         2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 
         3L, 2L, 2L), offset = 0, gain = 1, inmemory = TRUE, fromdisk = FALSE, isfactor = FALSE, 
         attributes = list(), haveminmax = TRUE, min = 1L, max = 3L, band = 1L, unit = "", 
         names = "clumps"), legend = new(".RasterLegend", type = character(0), values = logical(0), 
         color = logical(0), names = logical(0), colortable = logical(0)), title = character(0), 
         extent = new("Extent", xmin = 0, xmax = 30, ymin = 0, ymax = 30), rotated = FALSE, 
         rotation = new(".Rotation", geotrans = numeric(0), transfun = function () 
         NULL), ncols = 30L, nrows = 30L, crs = new("CRS", projargs = NA_character_), 
         history = list(), z = list()), directions = 8)
  9: lsm_c_mesh.RasterLayer(landscape = new("RasterLayer", file = new(".RasterFile", name = "", 
         datanotation = "FLT4S", byteorder = "little", nodatavalue = -Inf, NAchanged = FALSE, 
         nbands = 1L, bandorder = "BIL", offset = 0L, toptobottom = TRUE, blockrows = 0L, 
         blockcols = 0L, driver = "", open = FALSE), data = new(".SingleLayerData", values = c(1L, 
     3L, 3L, 3L, 3L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
     3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 3L, 3L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
     3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 3L, 3L, 
     2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 
     3L, 3L, 3L, 3L, 3L, 2L, 2L, 3L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 
     1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 
     3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 
     2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 
     1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 
     3L, 3L, 2L, 2L, 1L, 1L, 1L, 1L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, 1L, 3L, 3L, 3L, 3L, 2L, 2L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
     2L, 2L, 2L, 2L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 3L, 3L, 
     3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
     3L, 3L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 
     3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 3L, 3L, 2L, 3L, 2L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 
     2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 3L, 3L, 3L, 1L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 
     2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 3L, 2L, 2L, 3L, 
     3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 
     2L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
     2L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 2L, 2L), offset = 0, 
         gain = 1, inmemory = TRUE, fromdisk = FALSE, isfactor = FALSE, attributes = list(), 
         haveminmax = TRUE, min = 1L, max = 3L, band = 1L, unit = "", names = "clumps"), 
         legend = new(".RasterLegend", type = character(0), values = logical(0), color = logical(0), 
             names = logical(0), colortable = logical(0)), title = character(0), extent = new("Extent", 
             xmin = 0, xmax = 30, ymin = 0, ymax = 30), rotated = FALSE, rotation = new(".Rotation", 
             geotrans = numeric(0), transfun = function () 
             NULL), ncols = 30L, nrows = 30L, crs = new("CRS", projargs = NA_character_), 
         history = list(), z = list()), directions = 8)
  10: lapply(X = raster::as.list(landscape), FUN = lsm_c_mesh_calc, directions = directions)
  11: FUN(X[[i]], ...)
  12: dplyr::mutate(lsm_l_ta_calc(landscape, directions = directions), value = value * 
         10000)
  13: lsm_l_ta_calc(landscape, directions = directions)
  14: dplyr::summarise(lsm_p_area_calc(landscape, directions = directions), value = sum(value))
  15: lsm_p_area_calc(landscape, directions = directions)
  16: lapply(landscape_labeled, function(patches_class) {
         class <- sub("Class_", "", names(patches_class))
         area_patch_ij <- rcpp_get_composition_vector(x = raster::as.matrix(patches_class)) * 
             prod(raster::res(patches_class))/10000
         tibble::tibble(class = as.integer(class), value = area_patch_ij)
     })
  17: FUN(X[[i]], ...)
  18: tibble::tibble(class = as.integer(class), value = area_patch_ij)
  19: as_tibble(lst_quos(xs, expand = TRUE))
  20: lst_quos(xs, expand = TRUE)
  21: eval_tidy(xs[[i]], unique_output)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 1620 SKIPPED: 0 FAILED: 1
  1. Error: (unknown) (@test-show-correlation.R#6) 
  
  Error: testthat unit tests failed
  Execution halted