Learn R Programming

gtfstools (version 2.0.1)

get_frequencies_departures: Get the departures generated by frequencies entries

Description

Expands each entry of a frequencies table into its departures, every headway_secs from start_time until (but not including) end_time, as required by the GTFS specification. An entry whose start_time and end_time are equal generates a single departure. Only the unique departures of each trip are kept. Raises an error if any entry is invalid.

Usage

get_frequencies_departures(freqs)

Value

A data.table with the columns trip_id and departure_secs.

Arguments

freqs

A data.table with the columns trip_id, start_time_secs, end_time_secs and headway_secs (all but trip_id integers).