delay_trip: Shift Trips in Time

View source: R/delay_trip.R

delay_tripR Documentation

Shift Trips in Time

Description

Adds a number of seconds to every non-empty arrival and departure time for selected trips. GTFS times above 24 hours are preserved.

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
)


GTFSwizard documentation built on Aug. 21, 2026, 5:16 p.m.