Running ‘testthat.R’ [29s/62s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(NLMR)
  > 
  > test_check("NLMR")
  ── 1. Error: nlm_distancegradient behaves like it should (@test_distancegradient
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: suppressWarnings(distance_gradient <- nlm_distancegradient(ncol = 9, nrow = 12, origin = c(5, 
         5, 5, 5))) at testthat/test_distancegradient.R:5
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: nlm_distancegradient(ncol = 9, nrow = 12, origin = c(5, 5, 5, 5))
  4: checkmate::assert_true(origin[2] <= ncol)
  5: checkTRUE(x, na.ok)
  6: qassert(na.ok, "B1")
  
  ── 2. Error: nlm_distancegradient sets origin right (@test_distancegradient.R#14
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: suppressWarnings(distance_gradient <- nlm_distancegradient(ncol = 9, nrow = 12, origin = c(5, 
         5, 5, 5))) at testthat/test_distancegradient.R:14
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: nlm_distancegradient(ncol = 9, nrow = 12, origin = c(5, 5, 5, 5))
  4: checkmate::assert_true(origin[2] <= ncol)
  5: checkTRUE(x, na.ok)
  6: qassert(na.ok, "B1")
  
  ── 3. Error: nlm_distancegradient produces the right number of rows (@test_dista
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: suppressWarnings(distance_gradient <- nlm_distancegradient(ncol = 9, nrow = 12, origin = c(5, 
         5, 5, 5))) at testthat/test_distancegradient.R:22
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: nlm_distancegradient(ncol = 9, nrow = 12, origin = c(5, 5, 5, 5))
  4: checkmate::assert_true(origin[2] <= ncol)
  5: checkTRUE(x, na.ok)
  6: qassert(na.ok, "B1")
  
  ── 4. Error: nlm_distancegradient produces the right number of columns (@test_di
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: suppressWarnings(distance_gradient <- nlm_distancegradient(ncol = 9, nrow = 12, origin = c(5, 
         5, 5, 5))) at testthat/test_distancegradient.R:29
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: nlm_distancegradient(ncol = 9, nrow = 12, origin = c(5, 5, 5, 5))
  4: checkmate::assert_true(origin[2] <= ncol)
  5: checkTRUE(x, na.ok)
  6: qassert(na.ok, "B1")
  
  ── 5. Error: (unknown) (@test_fBm.R#4)  ────────────────────────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: nlm_fbm(ncol = 9, nrow = 12, fract_dim = 0.5) at testthat/test_fBm.R:4
  2: checkmate::assert_true(fract_dim > 0)
  3: checkTRUE(x, na.ok)
  4: qassert(na.ok, "B1")
  
  ── 6. Error: (unknown) (@test_mpd.R#5)  ────────────────────────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'raw'
  1: suppressMessages(mpd_raster <- nlm_mpd(ncol = 64, nrow = 64, roughness = 0.6)) at testthat/test_mpd.R:5
  2: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  3: nlm_mpd(ncol = 64, nrow = 64, roughness = 0.6)
  4: checkmate::assert_true(roughness <= 1 || roughness >= 0)
  5: checkTRUE(x, na.ok)
  6: qassert(na.ok, "B1")
  
  ── 7. Error: (unknown) (@test_neigh.R#4)  ──────────────────────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'character'
  1: nlm_neigh(ncol = 20, nrow = 20, p_neigh = 0.1, p_empty = 0.3, categories = 5, neighbourhood = 4) at testthat/test_neigh.R:4
  2: checkmate::assert_true(neighbourhood == 4 || neighbourhood == 8)
  3: checkTRUE(x, na.ok)
  4: qassert(na.ok, "B1")
  
  ── 8. Error: (unknown) (@test_percolation.R#4)  ────────────────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'NULL'
  1: nlm_percolation(ncol = 9, nrow = 12, prob = 0.5) at testthat/test_percolation.R:4
  2: checkmate::assert_true(prob <= 1, na.ok = FALSE)
  3: checkTRUE(x, na.ok)
  4: qassert(na.ok, "B1")
  
  ── 9. Error: (unknown) (@test_randomcluster.R#4)  ──────────────────────────────
  LOGICAL() can only be applied to a 'logical', not a 'raw'
  1: suppressWarnings(random_cluster <- nlm_randomcluster(ncol = 40, nrow = 30, neighbourhood = 4, 
         p = 0.4)) at testthat/test_randomcluster.R:4
  2: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  3: nlm_randomcluster(ncol = 40, nrow = 30, neighbourhood = 4, p = 0.4)
  4: checkmate::assert_true(p <= 1)
  5: checkTRUE(x, na.ok)
  6: qassert(na.ok, "B1")
  
  
   *** caught segfault ***
  address 84a4a9a, cause 'memory not mapped'
  
  Traceback:
   1: qassert(na.ok, "B1")
   2: checkTRUE(x, na.ok)
   3: checkmate::assert_true(minl <= ncol)
   4: nlm_randomrectangularcluster(ncol = 30, nrow = 30, minl = 5,     maxl = 10)
   5: eval(code, test_env)
   6: eval(code, test_env)
   7: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
   8: doTryCatch(return(expr), name, parentenv, handler)
   9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  11: doTryCatch(return(expr), name, parentenv, handler)
  12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  15: test_code(NULL, exprs, env)
  16: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  17: force(code)
  18: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        end_context()    })
  19: FUN(X[[i]], ...)
  20: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  21: force(code)
  22: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  23: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  24: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  25: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  26: test_check("NLMR")
  An irrecoverable exception occurred. R is aborting now ...