Learn R Programming

gtfstools (version 2.0.1)

download_validator: Download MobilityData's GTFS validator

Description

Downloads MobilityData's command line tool to validate GTFS feeds.

Usage

download_validator(
  path = tempdir(),
  version = "latest",
  force = FALSE,
  quiet = TRUE
)

Value

Invisibly returns the normalized path to the downloaded validator. If the validator can't be downloaded due to network problems (e.g. no internet connection or GitHub being unavailable), it informs that with a message and invisibly returns NULL.

Arguments

path

A string. The directory where the validator should be saved to. By default, the function downloads the validator to a temporary directory, which is removed when the R session ends. Use a persistent directory to reuse the validator across sessions.

version

A string. The version of the validator that should be downloaded. Defaults to "latest", but accepts version numbers as strings (i.e. to download version v6.0.0 please enter "6.0.0"). Please check MobilityData/gtfs-validator releases for the full set of available versions.

force

A logical. Whether to overwrite a previously downloaded validator in path. Defaults to FALSE.

quiet

A logical. Whether to hide log messages and progress bars. Defaults to TRUE.

See Also

Other validation: list_validator_versions(), validate_gtfs()

Examples

Run this code
if (FALSE) { # identical(tolower(Sys.getenv("NOT_CRAN")), "true") && curl::has_internet()
path <- tempdir()

download_validator(path)

# specifying a specific version
download_validator(path, version = "6.0.0")
}

Run the code above in your browser using DataLab