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

> ### 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 /tmp/RtmpTmmuxI/working_dir/RtmpKNMwph/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.10.2, GDAL 3.4.3, PROJ 8.2.1; sf_use_s2() is TRUE
udunits database from /usr/share/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 : /data/gannet/ripley/R/test-dev/sfheaders/libs/sfheaders.so(Rcpp::exception::exception(char const*, bool)+0x68) [0x7ff4c9eee388]
   2 : /data/gannet/ripley/R/test-dev/sfheaders/libs/sfheaders.so(void Rcpp::stop<>(char const*)+0x50) [0x7ff4c9ed8aa0]
   3 : /data/gannet/ripley/R/test-dev/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)+0x63b) [0x7ff4c9f1110b]
   4 : /data/gannet/ripley/R/test-dev/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)+0x2e) [0x7ff4c9ef686e]
   5 : /data/gannet/ripley/R/test-dev/sfheaders/libs/sfheaders.so(_sfheaders_rcpp_cast_sf+0xa1) [0x7ff4c9ee1ba1]
   6 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4b1e6e]
   7 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fe7e2]
   8 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   9 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   10 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   11 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   12 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   13 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   14 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   15 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   16 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   17 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   18 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   19 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   20 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   21 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e454b]
   22 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4efa20]
   23 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb2cb]
   24 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   25 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e454b]
   26 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4efa20]
   27 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb2cb]
   28 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   29 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e454b]
   30 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4efa20]
   31 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb2cb]
   32 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   33 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e454b]
   34 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4efa20]
   35 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb2cb]
   36 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   37 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   38 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   39 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   40 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   41 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   42 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   43 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   44 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   45 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   46 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   47 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   48 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   49 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   50 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   51 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   52 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   53 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   54 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   55 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x2b5) [0x4e3eb5]
   56 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e9341]
   57 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x566) [0x4e4166]
   58 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e59d8]
   59 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x566) [0x4e4166]
   60 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   61 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   62 : /data/gannet/ripley/R/R-devel/bin/exec/R(R_forceAndCall+0x158) [0x4e6338]
   63 : /data/gannet/ripley/R/test-dev/purrr/libs/purrr.so(+0x4c63) [0x7ff4c9e52c63]
   64 : /data/gannet/ripley/R/test-dev/purrr/libs/purrr.so(+0x4e1c) [0x7ff4c9e52e1c]
   65 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4b1e0a]
   66 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4b2438]
   67 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x7a4) [0x4e43a4]
   68 : /data/gannet/ripley/R/test-dev/purrr/libs/purrr.so(+0x2c3e) [0x7ff4c9e50c3e]
   69 : /data/gannet/ripley/R/R-devel/bin/exec/R(R_ExecWithCleanup+0x78) [0x4954b8]
   70 : /data/gannet/ripley/R/test-dev/purrr/libs/purrr.so(+0x2f52) [0x7ff4c9e50f52]
   71 : /data/gannet/ripley/R/test-dev/purrr/libs/purrr.so(+0x2fd5) [0x7ff4c9e50fd5]
   72 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4b1e8a]
   73 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fe7e2]
   74 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   75 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   76 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   77 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   78 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   79 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e454b]
   80 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4efa20]
   81 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb2cb]
   82 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   83 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e454b]
   84 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4efa20]
   85 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb2cb]
   86 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   87 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   88 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   89 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   90 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   91 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   92 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   93 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   94 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   95 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]
   96 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_applyClosure+0x252) [0x4e3a92]
   97 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4fb6fa]
   98 : /data/gannet/ripley/R/R-devel/bin/exec/R(Rf_eval+0x188) [0x4e3d88]
   99 : /data/gannet/ripley/R/R-devel/bin/exec/R() [0x4e29f1]

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