Learn R Programming

gtfstools (version 2.0.1)

get_trip_departures: Get the departure times of trips

Description

Returns the departure times of the specified trips, in seconds after midnight. Trips listed in the frequencies table depart several times, as generated by get_frequencies_departures() from the frequencies table. Other trips depart once, at the earliest departure time listed for them in stop_times. Trips without any departure time are not included.

Usage

get_trip_departures(gtfs, trip_id)

Value

A data.table with the columns trip_id and departure_secs.

Arguments

gtfs

A GTFS object, as created by read_gtfs().

trip_id

A character vector including the trip_ids to have their departures returned.