route_types: Retrieve a translation from route type number to name

Description Usage Arguments Value Examples

View source: R/route-types.R

Description

Route types (tram, train, etc.) are provided to the PTV API as an integer code. This function retrieves a named vector in which the values are the route type descriptions, and the names of the vector are the route type numbers. Note that "Night Bus" is a separate route type.

Usage

1

Arguments

user_id

Integer or character. A user ID or devid provided by Public Transport Victoria. Refer to ?ptvapi for more details.

api_key

Character. An API key, with dashes, provided by Public Transport Victoria. Refer to ?ptvapi for more details.

Value

A named integer vector in which the values are the route type descriptions, and the names of the vector are the route type numbers.

Examples

1
2
3
4
## Not run: 
route_types()

## End(Not run)

ptvapi documentation built on May 2, 2021, 9:06 a.m.