Learn R Programming

gtfs2gps (version 2.0-2)

remove_by_route_id: Remove GTFS data by route ids

Description

Remove a GTFS data by its route ids, dropping routes and trips. It also removes the unnecessary stop_times, shapes, frequencies (if exist in a feed), and stops accordingly.

Usage

remove_by_route_id(gtfs_data, route_ids)

Value

A filtered GTFS data without service information of the set route ids.

Arguments

gtfs_data

A list of data.tables read using gtfs2gps::reag_gtfs().

route_ids

A vector of route ids belonging to the routes of the gtfs_data data. Note that route_id might be loaded by gtfs2gps::read_gtfs() as a string or a number, depending on the available values.

Examples

Run this code
warsaw <- read_gtfs(system.file("extdata/warsaw.zip", package="gtfs2gps"))

subset <- remove_by_route_id(warsaw, c("15", "175"))

Run the code above in your browser using DataLab