Learn R Programming

valhallr (version 0.1.0)

print_trip: Print Trip Summary and Turn-By-Turn Directions

Description

Print Trip Summary and Turn-By-Turn Directions

Usage

print_trip(trip, all_details = FALSE)

Arguments

trip

A trip response from valhallr::route().

all_details

Boolean. Should we print each turn-by-turn instruction along with an overall summary?

Value

The input trip object, invisibly.

Examples

Run this code
# NOT RUN {
  library(valhallr)
  # set up origin and destination data
  from <- test_data("uottawa")
  to <- test_data("cdntirecentre")

  # calculate the trip
  trip <- route(from = from, to = to)

  # show overall trip information
  print_trip(trip, all_details = FALSE)

  # make an interactive map of the trip using the leaflet package
  map_trip(trip, method = "leaflet")
# }

Run the code above in your browser using DataLab