Running 'testthat.R' [20s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(gtfs2gps)
  gtfs2gps version 2.1-0 is now loaded
  NOTE: All filter functions from gtfs2gps were removed
  Please replace them by similar functions from gtfstools
  > library(magrittr)
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  > 
  > test_check("gtfs2gps")
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  $message
  [1] "geometries - Expecting an integer vector for indexing"
  
  $call
  NULL
  
  $cppstack
  NULL
  
  [ FAIL 5 | WARN 0 | SKIP 0 | PASS 66 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_adjust_speed.R:6'): adjust_speed ───────────────────────────────
  Error in `Ops.units(output$speed, units::set_units(0, "km/h"))`: both operands of the expression should be "units" objects
  Backtrace:
      ▆
   1. └─gtfs2gps::gtfs2gps(poa) at test_adjust_speed.R:6:4
   2.   ├─base::unique(...)
   3.   ├─base::which(output$speed < units::set_units(0, "km/h"))
   4.   └─units:::Ops.units(output$speed, units::set_units(0, "km/h"))
  ── Error ('test_append_height.R:11'): append_height ────────────────────────────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'y' in selecting a method for function 'extract': both operands of the expression should be "units" objects
  Backtrace:
       ▆
    1. ├─gtfs2gps(gtfs, spatial_resolution = 500) %>% ... at test_append_height.R:11:2
    2. ├─gtfs2gps::append_height(., srtmfile)
    3. │ └─terra::extract(myraster, gps[, c("shape_pt_lon", "shape_pt_lat")])
    4. ├─gtfs2gps::gtfs2gps(gtfs, spatial_resolution = 500)
    5. │ ├─base::unique(...)
    6. │ ├─base::which(output$speed < units::set_units(0, "km/h"))
    7. │ └─units:::Ops.units(output$speed, units::set_units(0, "km/h"))
    8. │   └─base::stop("both operands of the expression should be \"units\" objects")
    9. └─base::.handleSimpleError(...)
   10.   └─base (local) h(simpleError(msg, call))
  ── Error ('test_gps_as_sflinestring.R:10'): gps_as_sflinestring ────────────────
  Error in `Ops.units(output$speed, units::set_units(0, "km/h"))`: both operands of the expression should be "units" objects
  Backtrace:
      ▆
   1. ├─gtfs2gps(subset) %>% adjust_speed() at test_gps_as_sflinestring.R:10:2
   2. ├─gtfs2gps::adjust_speed(.)
   3. │ └─data.table::copy(gps_data)
   4. └─gtfs2gps::gtfs2gps(subset)
   5.   ├─base::unique(...)
   6.   ├─base::which(output$speed < units::set_units(0, "km/h"))
   7.   └─units:::Ops.units(output$speed, units::set_units(0, "km/h"))
  ── Error ('test_gps_as_sfpoints.R:11'): gps_as_sfpoints ────────────────────────
  Error in `Ops.units(output$speed, units::set_units(0, "km/h"))`: both operands of the expression should be "units" objects
  Backtrace:
      ▆
   1. └─gtfs2gps::gtfs2gps(subset) at test_gps_as_sfpoints.R:11:2
   2.   ├─base::unique(...)
   3.   ├─base::which(output$speed < units::set_units(0, "km/h"))
   4.   └─units:::Ops.units(output$speed, units::set_units(0, "km/h"))
  ── Error ('test_gtfs2gps.R:4'): gtfs2gps ───────────────────────────────────────
  Error in `Ops.units(output$speed, units::set_units(0, "km/h"))`: both operands of the expression should be "units" objects
  Backtrace:
      ▆
   1. ├─... %>% gtfs2gps(parallel = FALSE, spatial_resolution = 50) at test_gtfs2gps.R:4:4
   2. └─gtfs2gps::gtfs2gps(., parallel = FALSE, spatial_resolution = 50)
   3.   ├─base::unique(...)
   4.   ├─base::which(output$speed < units::set_units(0, "km/h"))
   5.   └─units:::Ops.units(output$speed, units::set_units(0, "km/h"))
  
  [ FAIL 5 | WARN 0 | SKIP 0 | PASS 66 ]
  Error: Test failures
  Execution halted