getFlightDistance: getFlightDistance

View source: R/getFlightDistance.R

getFlightDistanceR Documentation

getFlightDistance

Description

getFlightDistance extracts aircraft flight distance from an online source, typically a API...

Usage

getFlightDistance(ref1, ref2, units = "km", verbose = TRUE)

Arguments

ref1, ref2

IATA code for department and arrival airports, respectively (character).

units

units to report distance in, see below.

verbose

if TRUE, function returns a report table else just answer in requested units

Value

If ref1 and ref2 are matched to known airports, the function outputs reported distance

Note

This version of the function extracts results from the webflyer.com mileage calculator: http://www.webflyer.com/travel/mileage_calculator

Examples

#flight distance Los Angeles to London Heathrow
getFlightDistance("LAX", "LHR")

karlropkins/just.testing documentation built on March 27, 2022, 4:28 p.m.