get_service_days: Get the service days of a GTFS object and their number of...

get_service_daysR Documentation

Get the service days of a GTFS object and their number of trips

Description

Returns the days on which at least one service used by a trip runs (any service, if trips has no service_id field), according to the calendar and calendar_dates tables (either may be missing), and the number of trips that run on each of them.

Usage

get_service_days(gtfs, count_trips = TRUE)

Arguments

gtfs

A GTFS object, as created by read_gtfs().

count_trips

A logical. Whether to count the trips of each day. If FALSE, n_trips is NA, which is faster when only the days are needed.

Value

A data.table with the columns date and n_trips (NA if trips has no service_id field or if count_trips = FALSE), sorted by date, with one row per service day.


gtfstools documentation built on Oct. 28, 2026, 5:13 p.m.