get_children_stops {gtfstools} | R Documentation |
Get children stops recursively
Description
Returns the (recursive) children stops of each specified stop_id
.
Recursive in this context means it returns all children's children (i.e.
first children, then children's children, and then their children, and so
on).
Usage
get_children_stops(gtfs, stop_id = NULL)
Arguments
gtfs |
A GTFS object, as created by |
stop_id |
A string vector including the |
Value
A data.table
containing the stop_id
s and their children'
stop_id
s. If a stop doesn't have a child, its correspondent child_id
entry is marked as ""
.
Examples
data_path <- system.file("extdata/ggl_gtfs.zip", package = "gtfstools")
gtfs <- read_gtfs(data_path)
children <- get_children_stops(gtfs)
head(children)
# use the stop_id argument to control which stops are analyzed
children <- get_children_stops(gtfs, stop_id = c("F12S", "F12N"))
children
[Package gtfstools version 1.2.0 Index]