edit_dwelltime: Scale Dwell Times

View source: R/edit_dwelltime.R

edit_dwelltimeR Documentation

Scale Dwell Times

Description

Multiplies dwell time at selected trip-stop calls and propagates each change to all later times in the same trip. Arrival at the edited stop is retained; departure and subsequent calls move by the dwell-time difference. 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

edit_dwelltime(gtfs, trips = "all", stops = "all", factor)

Arguments

gtfs

A GTFS object.

trips, stops

Character ID vectors or '"all"'.

factor

One non-negative numeric multiplier.

Value

A modified 'wizardgtfs' object.

See Also

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

Examples

edited <- edit_dwelltime(
  for_rail_gtfs,
  trips = for_rail_gtfs$trips$trip_id[1:2],
  stops = for_rail_gtfs$stops$stop_id[1:2],
  factor = 1.5
)


GTFSwizard documentation built on Nov. 18, 2026, 1:07 a.m.