Skip to content

Commit 0ce8eb4

Browse files
committed
also fix 'gtfs_next_start_times' when stops have duplicted ids
1 parent 1b21018 commit 0ce8eb4

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: m4ra
22
Title: Many-to-Many Multi-Modal Routing Aggregator
3-
Version: 0.1.1.052
3+
Version: 0.1.1.053
44
Authors@R:
55
person(given = "Mark",
66
family = "Padgham",

R/gtfs.R

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,6 @@ gtfs_next_intervals <- function (gtfs, stops, res, start_time_limits) {
180180
)
181181
next_starts [next_starts <= 0] <- NA_integer_
182182

183-
# reduce dimension to only unique stops:
184-
index <- match (gtfs$stop_ids$stop_ids, gtfs$stops$stop_id)
185-
next_starts <- next_starts [, index]
186-
187183
first_starts <- lapply (res, function (i) as.vector (i [, 1]))
188184
first_starts <- do.call (rbind, first_starts)
189185
first_starts [first_starts == .Machine$integer.max | first_starts <= 0] <- NA_integer_
@@ -246,7 +242,7 @@ gtfs_next_start_times <- function (gtfs, stops, start_times, start_interval) {
246242
start_times [start_times == .Machine$integer.max] <- NA_integer_
247243

248244
rownames (start_times) <- stop_names
249-
colnames (start_times) <- gtfs$stops$stop_id
245+
colnames (start_times) <- gtfs$stop_ids$stop_id
250246

251247
# diag (start_times) <- 0L # diagonals set in prepare-data routines:
252248

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"codeRepository": "https://github.com/UrbanAnalyst/m4ra",
88
"issueTracker": "https://github.com/UrbanAnalyst/m4ra/issues",
99
"license": "https://spdx.org/licenses/GPL-3.0",
10-
"version": "0.1.1.052",
10+
"version": "0.1.1.053",
1111
"programmingLanguage": {
1212
"@type": "ComputerLanguage",
1313
"name": "R",

0 commit comments

Comments
 (0)