Learn R Programming

gtfstools (version 2.0.1)

first_departure_per_trip: Get the earliest departure of each trip

Description

Get the earliest departure of each trip

Usage

first_departure_per_trip(trip_id, departure_secs)

Value

A data.table with the columns trip_id and departure_secs (the earliest non-missing departure of the trip), with one row per trip with at least one departure, in order of first appearance of the timed rows.

Arguments

trip_id, departure_secs

The trip_id and the departure time (in seconds) of each stop_times row.