@@ -122,7 +122,7 @@ m4ra_gtfs_traveltimes <- function (gtfs,
122122 res_i [res_i == .Machine $ integer.max ] <- NA_integer_
123123
124124 rownames (res_i ) <- stops
125- colnames (res_i ) <- gtfs $ stop_ids $ stop_id
125+ colnames (res_i ) <- gtfs $ stops $ stop_id
126126
127127 # diag (res_i) <- 0L # diagonals set in "prepare-data" routines
128128
@@ -140,13 +140,6 @@ m4ra_gtfs_traveltimes <- function (gtfs,
140140
141141# ' Main function to calculate intervals to next fastest connection, called from
142142# ' `m4ra_gtfs_traveltimes()` if `next_interval = TRUE`.
143- # '
144- # ' @param res Result of rcpp_traveltimes as a list of matrices (n, 3), where n
145- # ' is the number of "stop_id" values in gtfs$stops. The 'gtfs_next_start_times'
146- # ' routine returns a matrix with number of rows equal to 'nrow(gtfs$stop_ids)',
147- # ' which is generally less, because that is unique IDs only. The two have to
148- # ' reconciled below.
149- # '
150143# ' @noRd
151144gtfs_next_intervals <- function (gtfs , stops , res , start_time_limits ) {
152145
@@ -189,7 +182,7 @@ gtfs_next_intervals <- function (gtfs, stops, res, start_time_limits) {
189182 # diag (next_interval) <- NA_integer_
190183
191184 rownames (next_interval ) <- stops
192- colnames (next_interval ) <- gtfs $ stop_ids $ stop_id
185+ colnames (next_interval ) <- gtfs $ stops $ stop_id
193186
194187 return (next_interval )
195188}
@@ -242,7 +235,7 @@ gtfs_next_start_times <- function (gtfs, stops, start_times, start_interval) {
242235 start_times [start_times == .Machine $ integer.max ] <- NA_integer_
243236
244237 rownames (start_times ) <- stop_names
245- colnames (start_times ) <- gtfs $ stop_ids $ stop_id
238+ colnames (start_times ) <- gtfs $ stops $ stop_id
246239
247240 # diag (start_times) <- 0L # diagonals set in prepare-data routines:
248241
0 commit comments