Learn R Programming

GTFSwizard (version 1.1.0)

write_gtfs: Write GTFS Data to Zip File

Description

`write_gtfs` exports a GTFS object to a zip file format, suitable for use in various GTFS-compatible software. This function supports multiple GTFS object formats and ensures compatibility by converting data frames and spatial objects as needed.

Usage

write_gtfs(gtfs, zipfile, ...)

Value

None. This function writes the GTFS data directly to the specified `zipfile`.

Arguments

gtfs

A GTFS object. This can be in `wizardgtfs` or list format.

zipfile

A character string specifying the path to the output zip file.

...

Additional arguments to pass to `gtfsio::export_gtfs()`.

Details

The function converts spatial data frames (e.g., shapes and stops) to standard data frames, removes additional service pattern tables, and exports.

See Also

[GTFSwizard::read_gtfs()], [GTFSwizard::as_wizardgtfs()],

Examples

Run this code
if (FALSE) {
# Export a wizardgtfs object to a zip file
write_gtfs(for_rail_gtfs, "gtfs_export.zip")
}

Run the code above in your browser using DataLab