write_gtfs | R Documentation |
Writes GTFS objects as GTFS .zip
files.
write_gtfs( gtfs, path, files = NULL, standard_only = FALSE, as_dir = FALSE, overwrite = TRUE, quiet = TRUE )
gtfs |
A GTFS object, as created by |
path |
The path to the |
files |
A character vector containing the name of the elements to be
written to the feed. If |
standard_only |
Whether to write only standard files and fields
(defaults to |
as_dir |
Whether to write the feed as a directory, instead of a |
overwrite |
Whether to overwrite existing |
quiet |
Whether to hide log messages and progress bars (defaults to
|
Invisibly returns the same GTFS object passed to the gtfs
parameter.
Other io functions:
read_gtfs()
data_path <- system.file("extdata/spo_gtfs.zip", package = "gtfstools") gtfs <- read_gtfs(data_path) tmp_dir <- file.path(tempdir(), "tmpdir") dir.create(tmp_dir) list.files(tmp_dir) #' tmp_file <- tempfile(pattern = "gtfs", tmpdir = tmp_dir, fileext = ".zip") write_gtfs(gtfs, tmp_file) list.files(tmp_dir) gtfs_all_files <- read_gtfs(tmp_file) names(gtfs_all_files) write_gtfs(gtfs, tmp_file, files = "stop_times") gtfs_stop_times <- read_gtfs(tmp_file) names(gtfs_stop_times)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.