View source: R/get_children_stops.R
get_children_stops | R Documentation |
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).
get_children_stops(gtfs, stop_id = NULL)
gtfs |
A GTFS object, as created by |
stop_id |
A string vector including the |
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 ""
.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.