Read a fare structure object from a file
read_fare_structure(file_path, encoding = "UTF-8")
A path pointing to a fare structure with a .zip
extension.
A string. Passed to data.table::fread()
, defaults to
"UTF-8"
. Other possible options are "unknown"
and "Latin-1"
. Please
note that this is not used to re-encode the input, but to enable handling
encoded strings in their native encoding.
A fare structure object.
Other fare structure:
setup_fare_structure()
,
write_fare_structure()
path <- system.file("extdata/poa/fares/fares_poa.zip", package = "r5r")
fare_structure <- read_fare_structure(path)