stops_on_route: Stops on a given route and route type

Description Usage Arguments Value Examples

View source: R/stops.R

Description

Stops on a given route and route type

Usage

1
2
3
4
5
6
7
stops_on_route(
  route_id,
  route_type,
  direction_id = NULL,
  user_id = determine_user_id(),
  api_key = determine_api_key()
)

Arguments

route_id

Integer. These can be listed and described with the routes function.

route_type

A route type which can be provided either as a non-negative integer code, or as a character: "Tram", "Train", "Bus", "Vline" or "Night Bus". Character inputs are not case-sensitive. Use the route_types function to extract a vector of all route types.

direction_id

Optionally filter by a direction ID. These can be obtained with the directions_on_route function.

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 tibble with the following columns:

Examples

1
2
3
4
5
## Not run: 
stops_on_route(6, route_type = "Train")
stops_on_route(6, route_type = 0)

## End(Not run)

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