Description Usage Arguments Value See Also Examples
Writes in-memory GTFS objects as GTFS .zip
files. Conditionally
includes optional and extra .txt
files (check
validate_gtfs
documentation to check what are optional/extra
files).
1 2 3 4 5 6 7 8 9 |
gtfs |
A GTFS object as created by |
path |
The path to the |
optional |
Whether to write optional |
extra |
Whether to write extra |
overwrite |
Whether to overwrite existing |
quiet |
Whether to hide log messages and progress bars (defaults to TRUE). |
warnings |
Whether to display warning messages (defaults to TRUE). |
Invisibly returns the provided GTFS object with an updated
validation_result
attribute.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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_all_files, tmp_file, optional = FALSE)
gtfs_no_opt <- read_gtfs(tmp_file)
names(gtfs_no_opt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.