[.gtfs | R Documentation |
Subsetting a GTFS object using [
preserves the object class.
## S3 method for class 'gtfs'
x[value]
x |
A GTFS object. |
value |
Either a numeric or a character vector. Designates the elements to be returned. |
A GTFS object.
gtfs_path <- system.file("extdata/ggl_gtfs.zip", package = "gtfsio")
gtfs <- import_gtfs(gtfs_path)
names(gtfs)
class(gtfs)
small_gtfs <- gtfs[1:5]
names(small_gtfs)
class(small_gtfs)
small_gtfs <- gtfs[c("shapes", "trips")]
names(small_gtfs)
class(small_gtfs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.