Running 'testthat.R' [27m]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(ElevDistr)
  > 
  > test_check("ElevDistr")
  
    |                                                                  
    |                                                            |   0%
    |                                                                  
    |============================================================| 100%
  
    |                                                                  
    |                                                            |   0%
    |                                                                  
    |============================================================| 100%
  
    |                                                                  
    |                                                            |   0%
    |                                                                  
    |============================================================| 100%
  
    |                                                                  
    |                                                            |   0%
    |                                                                  
    |====================                                        |  33%
    |                                                                  
    |========================================                    |  67%
    |                                                                  
    |============================================================| 100%
  [ FAIL 3 | WARN 180 | SKIP 0 | PASS 153 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-calculate_distance.R:15:3'): output is correct ─────────────────
  Error in `if (treeline$lat1[i] == treeline$lat2[i]) {
      lonSeq <- seq(from = treeline$lon1[i], to = treeline$lon2[i], 
          by = (abs(treeline$lon2[i] - treeline$lon1[i]))/treelineSampling)
      lonSeq <- lonSeq[-(treelineSampling + 1)]
      lat <- treeline$lat1[i]
      latSeq <- rep(lat, treelineSampling)
  } else if (treeline$lon1[i] == treeline$lon2[i]) {
      latSeq <- seq(from = treeline$lat1[i], to = treeline$lat2[i], 
          by = (abs(treeline$lat2[i] - treeline$lat1[i]))/treelineSampling)
      latSeq <- latSeq[-(treelineSampling + 1)]
      lon <- treeline$lon1[i]
      lonSeq <- rep(lon, treelineSampling)
  }`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-calculate_distance.R:15:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─ElevDistr::calculate_distance(...)
  ── Error ('test-calculate_distance.R:34:3'): check input type ──────────────────
  Error in `if (treeline$lat1[i] == treeline$lat2[i]) {
      lonSeq <- seq(from = treeline$lon1[i], to = treeline$lon2[i], 
          by = (abs(treeline$lon2[i] - treeline$lon1[i]))/treelineSampling)
      lonSeq <- lonSeq[-(treelineSampling + 1)]
      lat <- treeline$lat1[i]
      latSeq <- rep(lat, treelineSampling)
  } else if (treeline$lon1[i] == treeline$lon2[i]) {
      latSeq <- seq(from = treeline$lat1[i], to = treeline$lat2[i], 
          by = (abs(treeline$lat2[i] - treeline$lat1[i]))/treelineSampling)
      latSeq <- latSeq[-(treelineSampling + 1)]
      lon <- treeline$lon1[i]
      lonSeq <- rep(lon, treelineSampling)
  }`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-calculate_distance.R:34:3
   2. │ └─testthat:::expect_condition_matching(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─ElevDistr::calculate_distance(...)
  ── Failure ('test-distance_to_treeline.R:11:3'): output is correct ─────────────
  distance_to_treeline(...) (`actual`) not equal to -1491 (`expected`).
  
    `actual`: -1480.0
  `expected`: -1491.0
  
  [ FAIL 3 | WARN 180 | SKIP 0 | PASS 153 ]
  Error: Test failures
  Execution halted