Running examples in ‘gtfs2gps-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: adjust_speed
> ### Title: Adjust the speeds of a gps-like table created with 'gtfs2gps'
> ### Aliases: adjust_speed
> 
> ### ** Examples
> 
> library(magrittr)
> poa <- read_gtfs(system.file("extdata/poa.zip", package="gtfs2gps")) %>%
+   gtfstools::filter_by_shape_id("T2-1") %>%
+   gtfstools::filter_by_weekday(c("monday", "wednesday")) %>%
+   filter_single_trip()
Unzipped the following files to /home/hornik/tmp/scratch/RtmpAnwAck/gtfsio:
  * agency.txt
  * calendar.txt
  * routes.txt
  * shapes.txt
  * stop_times.txt
  * stops.txt
  * trips.txt
Reading agency.txt
Reading calendar.txt
Reading routes.txt
Reading shapes.txt
Reading stop_times.txt
Reading stops.txt
Reading trips.txt
> 
> poa_gps <- gtfs2gps(poa)
Converting shapes to sf objects
Using 1 CPU cores
Processing the data

Attaching package: ‘purrr’

The following object is masked from ‘package:magrittr’:

    set_names


Attaching package: ‘data.table’

The following object is masked from ‘package:purrr’:

    transpose

Linking to GEOS 3.11.1, GDAL 3.6.2, PROJ 9.1.1; sf_use_s2() is TRUE
udunits database from /usr/share/xml/udunits/udunits2.xml
Some internal bug occurred while processing gtfs data.
Please give us a feedback by creating a GitHub issue
(https://github.com/ipeaGIT/gtfs2gps/issues/new)
and attaching a subset of your data created from the
code below:
################################################
$message
[1] "geometries - Expecting an integer vector for indexing"

$call
NULL

$cppstack

  1 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/sfheaders/libs/sfheaders.so(Rcpp::exception::exception(char const*, bool)+0x64) [0x7f6538b6e1b4]
   2 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/sfheaders/libs/sfheaders.so(void Rcpp::stop<>(char const*)+0x39) [0x7f6538b5a722]
   3 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/sfheaders/libs/sfheaders.so(sfheaders::cast::cast_sf(Rcpp::DataFrame_Impl<Rcpp::PreserveStorage>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)+0x603) [0x7f6538b8e723]
   4 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/sfheaders/libs/sfheaders.so(rcpp_cast_sf(Rcpp::DataFrame_Impl<Rcpp::PreserveStorage>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)+0x1a) [0x7f6538b75bfa]
   5 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/sfheaders/libs/sfheaders.so(_sfheaders_rcpp_cast_sf+0x8d) [0x7f6538b62bfd]
   6 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1003ae) [0x7f65589003ae]
   7 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x141978) [0x7f6558941978]
   8 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   9 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   10 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   11 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   12 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   13 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   14 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   15 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   16 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   17 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   18 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   19 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   20 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   21 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156752) [0x7f6558956752]
   22 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156a30) [0x7f6558956a30]
   23 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x14094b) [0x7f655894094b]
   24 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   25 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156752) [0x7f6558956752]
   26 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156a30) [0x7f6558956a30]
   27 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x14094b) [0x7f655894094b]
   28 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   29 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156752) [0x7f6558956752]
   30 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156a30) [0x7f6558956a30]
   31 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x14094b) [0x7f655894094b]
   32 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   33 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156752) [0x7f6558956752]
   34 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156a30) [0x7f6558956a30]
   35 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x14094b) [0x7f655894094b]
   36 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   37 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   38 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   39 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   40 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   41 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   42 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   43 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   44 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   45 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   46 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   47 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   48 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   49 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   50 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   51 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   52 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   53 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   54 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   55 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x275) [0x7f6558955f25]
   56 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x15a3a9) [0x7f655895a3a9]
   57 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x536) [0x7f65589561e6]
   58 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x158f10) [0x7f6558958f10]
   59 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x536) [0x7f65589561e6]
   60 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   61 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   62 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(R_forceAndCall+0x13f) [0x7f655895a8ef]
   63 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/purrr/libs/purrr.so(+0x44fb) [0x7f6538ad14fb]
   64 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/purrr/libs/purrr.so(+0x46a8) [0x7f6538ad16a8]
   65 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x10034a) [0x7f655890034a]
   66 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x100958) [0x7f6558900958]
   67 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x778) [0x7f6558956428]
   68 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/purrr/libs/purrr.so(+0x268a) [0x7f6538acf68a]
   69 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(R_ExecWithCleanup+0x60) [0x7f65588e76e0]
   70 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/purrr/libs/purrr.so(+0x2990) [0x7f6538acf990]
   71 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/purrr/libs/purrr.so(+0x29f1) [0x7f6538acf9f1]
   72 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1003ca) [0x7f65589003ca]
   73 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x141978) [0x7f6558941978]
   74 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   75 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   76 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   77 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   78 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   79 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156752) [0x7f6558956752]
   80 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156a30) [0x7f6558956a30]
   81 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x14094b) [0x7f655894094b]
   82 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   83 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156752) [0x7f6558956752]
   84 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x156a30) [0x7f6558956a30]
   85 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x14094b) [0x7f655894094b]
   86 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   87 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   88 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   89 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   90 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   91 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   92 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   93 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   94 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   95 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]
   96 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_applyClosure+0x19e) [0x7f655895874e]
   97 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x145134) [0x7f6558945134]
   98 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(Rf_eval+0x150) [0x7f6558955e00]
   99 : /home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib/libR.so(+0x1578da) [0x7f65589578da]

ids <- c('T2-1')
data <- gtfstools::filter_by_shape_id(poa, ids)
gtfs2gps::write_gtfs(data, 'shapes_with_error.zip')
################################################
0 out of 1 shapes (0%) were properly processed.
0 out of 1 trips (0%) were properly processed.
Error in Ops.units(output$speed, units::set_units(0, "km/h")) : 
  both operands of the expression should be "units" objects
Calls: gtfs2gps -> unique -> which -> Ops.units
Execution halted