Running ‘testthat.R’ [37s/38s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(sfhotspot)
  > 
  > test_check("sfhotspot")
  `period` set to 28 days automatically
  The range of dates in the data is not a multiple of the chosen period
  ℹ The final period contains only 3 days
  ℹ Set `collapse = TRUE` to collapse this period into the penultimate period
  Cell size set to 0.00524 degrees automatically
  Cell size set to 0.00524 degrees automatically
  Cell size set to 0.00524 degrees automatically
  Cell size set to 0.00524 degrees automatically
  Cell size set to 0.00344 degrees automatically
  [ FAIL 5 | WARN 0 | SKIP 1 | PASS 168 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-set_cell_size.R:45:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-autoplot.R:6:1'): (code run outside of `test_that()`) ──────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])`: there is no package called 'terra'
  Backtrace:
       ▆
    1. ├─sfhotspot::hotspot_kde(...) at test-autoplot.R:6:1
    2. │ └─sfhotspot:::kernel_density(...)
    3. │   └─base::suppressMessages(...)
    4. │     └─base::withCallingHandlers(...)
    5. └─base::loadNamespace(x)
    6.   ├─base::namespaceImportFrom(...)
    7.   │ └─base::asNamespace(ns)
    8.   └─base::loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
    9.     ├─base::namespaceImport(...)
   10.     └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.       └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.         └─base (local) withOneRestart(expr, restarts[[1L]])
   13.           └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-hotspot_dual_kde.R:8:1'): (code run outside of `test_that()`) ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])`: there is no package called 'terra'
  Backtrace:
       ▆
    1. ├─sfhotspot::hotspot_dual_kde(...) at test-hotspot_dual_kde.R:8:1
    2. │ └─sfhotspot:::kernel_density(...)
    3. │   └─base::suppressMessages(...)
    4. │     └─base::withCallingHandlers(...)
    5. └─base::loadNamespace(x)
    6.   ├─base::namespaceImportFrom(...)
    7.   │ └─base::asNamespace(ns)
    8.   └─base::loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
    9.     ├─base::namespaceImport(...)
   10.     └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.       └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.         └─base (local) withOneRestart(expr, restarts[[1L]])
   13.           └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-hotspot_gistar.R:6:1'): (code run outside of `test_that()`) ────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])`: there is no package called 'terra'
  Backtrace:
       ▆
    1. ├─sfhotspot::hotspot_gistar(data_sf, quiet = TRUE) at test-hotspot_gistar.R:6:1
    2. │ └─sfhotspot:::kernel_density(...)
    3. │   └─base::suppressMessages(...)
    4. │     └─base::withCallingHandlers(...)
    5. └─base::loadNamespace(x)
    6.   ├─base::namespaceImportFrom(...)
    7.   │ └─base::asNamespace(ns)
    8.   └─base::loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
    9.     ├─base::namespaceImport(...)
   10.     └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.       └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.         └─base (local) withOneRestart(expr, restarts[[1L]])
   13.           └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-hotspot_kde.R:9:1'): (code run outside of `test_that()`) ───────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])`: there is no package called 'terra'
  Backtrace:
       ▆
    1. ├─sfhotspot::hotspot_kde(...) at test-hotspot_kde.R:9:1
    2. │ └─sfhotspot:::kernel_density(...)
    3. │   └─base::suppressMessages(...)
    4. │     └─base::withCallingHandlers(...)
    5. └─base::loadNamespace(x)
    6.   ├─base::namespaceImportFrom(...)
    7.   │ └─base::asNamespace(ns)
    8.   └─base::loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
    9.     ├─base::namespaceImport(...)
   10.     └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.       └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.         └─base (local) withOneRestart(expr, restarts[[1L]])
   13.           └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-kernel_density.R:19:1'): (code run outside of `test_that()`) ───
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])`: there is no package called 'terra'
  Backtrace:
       ▆
    1. ├─sfhotspot:::kernel_density(data = data_sf, grid = grid, bandwidth = 10000) at test-kernel_density.R:19:1
    2. │ └─base::suppressMessages(...)
    3. │   └─base::withCallingHandlers(...)
    4. └─base::loadNamespace(x)
    5.   ├─base::namespaceImportFrom(...)
    6.   │ └─base::asNamespace(ns)
    7.   └─base::loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
    8.     ├─base::namespaceImport(...)
    9.     └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   10.       └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   11.         └─base (local) withOneRestart(expr, restarts[[1L]])
   12.           └─base (local) doWithOneRestart(return(expr), restart)
  
  [ FAIL 5 | WARN 0 | SKIP 1 | PASS 168 ]
  Error: Test failures
  Execution halted