Calculate a vector of headway values -- that is, time intervals between consecutive services -- for all routes between two specified stations.

gtfs_route_headway(gtfs, from, to, quiet = FALSE)

Arguments

gtfs

A set of GTFS data returned from extract_gtfs or, for more efficient queries, pre-processed with gtfs_timetable.

from

Names, IDs, or approximate (lon, lat) coordinates of start stations (as stop_name or stop_id entry in the stops table, or a vector of two numeric values). See Note.

to

Corresponding Names, IDs, or coordinates of end station.

quiet

If TRUE, display a progress bar

Value

A single vector of integer values containing headways between all services across a single 24-hour period

See also