Skip to contents

Adds a number of seconds to every non-empty arrival and departure time for selected trips. Edited times that would move two or more days after midnight are wrapped back to the equivalent time on the next service day while keeping stop times non-decreasing within each trip.

Usage

delay_trip(gtfs, trip, duration)

Arguments

gtfs

A GTFS object.

trip

Character vector of `trip_id` values.

duration

Numeric seconds or an object coercible to seconds, such as a `difftime`.

Value

A modified `wizardgtfs` object.

See also

[GTFSwizard::edit_speed()], [GTFSwizard::set_dwelltime()]

Examples

delayed <- delay_trip(
  for_rail_gtfs,
  trip = for_rail_gtfs$trips$trip_id[1:2],
  duration = 300
)