efaR: Wrapper function for EFA XML API.

Description Usage Arguments Value Examples

Description

Wrapper function for EFA XML API.

Usage

1
efaR(origin, destination, datetime = Sys.time(), simplify = TRUE)

Arguments

origin

The origin of the journey. Either a name, coordinates or a DHID Code. If a name is provided the next station is calculated based on the geocode function and the 'Haversine distance'. Coordinates should be a vector with lon/lat.

destination

The destination of the journey. Either a name, coordinates or a DHID Code. If a name is provided the next station is calculated based on the geocode function and the 'Haversine distance'. Coordinates should be a vector with lon/lat.

simplify

Simplify determines whether the original xml result is returned or a simpler S3 object.

time

The date and time of the journey.

Value

Either the original xml result or an S3 object based on the simplify input.

Examples

1
2
3
4
5
6
7
8
# name example
efaR(origin = "Konstanz", destination = "Stuttgart")

# coordinates example
efaR(origin = c(9.173238, 47.67795), destination = "Stuttgart")

# dhid example
efaR(origin = "de:08335:6554", destination = "Stuttgart")

tollpatsch/efaR documentation built on May 24, 2019, 7:48 a.m.