From d10681e33dd912a86462bec1859bb9168f250a85 Mon Sep 17 00:00:00 2001 From: mpadge Date: Thu, 28 Sep 2023 14:55:11 +0200 Subject: [PATCH] fix gtfs_next_intervals --- DESCRIPTION | 2 +- R/gtfs.R | 2 +- codemeta.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1780c9a..6b789eb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: m4ra Title: Many-to-Many Multi-Modal Routing Aggregator -Version: 0.1.1.023 +Version: 0.1.1.024 Authors@R: person(given = "Mark", family = "Padgham", diff --git a/R/gtfs.R b/R/gtfs.R index c2f0064..0c21698 100644 --- a/R/gtfs.R +++ b/R/gtfs.R @@ -147,7 +147,7 @@ gtfs_next_intervals <- function (gtfs, stops, res, start_time_limits) { # may differ, but generally almost all connections leave on same service, # the start time of which is then accurately captured by the modal value. start_times <- vapply (res, function (i) { - index <- which (i [, 1] < (24L * 3600L)) + index <- which (i [, 1] > 0 & i [, 1] < (24L * 3600L)) out <- NA_integer_ if (length (index) > 0L) { vals <- sort (i [index, 1]) diff --git a/codemeta.json b/codemeta.json index 1e9a4fe..7afb174 100644 --- a/codemeta.json +++ b/codemeta.json @@ -7,7 +7,7 @@ "codeRepository": "https://github.com/UrbanAnalyst/m4ra", "issueTracker": "https://github.com/UrbanAnalyst/m4ra/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.1.1.023", + "version": "0.1.1.024", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R",