check_field_exists | R Documentation |
Checks the existence of fields, represented by columns, inside a GTFS object element.
check_field_exists(x, file, fields)
assert_field_exists(x, file, fields)
x |
A GTFS object. |
file |
A string. The element, that represents a GTFS text file, where fields should be searched. |
fields |
A character vector. The fields to check the existence of. |
check_field_exists
returns TRUE
if the check is successful, and
FALSE
otherwise.
assert_field_exists
returns x
invisibly if the check is
successful, and throws an error otherwise.
Other checking functions:
check_field_class()
,
check_file_exists()
gtfs_path <- system.file("extdata/ggl_gtfs.zip", package = "gtfsio")
gtfs <- import_gtfs(gtfs_path)
check_field_exists(gtfs, "calendar", c("monday", "tuesday"))
check_field_exists(gtfs, "calendar", c("monday", "oi"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.