add_arcs: Add arcs

Description Usage Arguments Examples

Description

Add arcs by coordinates.

Usage

1
add_arcs(p, origin.lon, origin.lat, destination.lon, destination.lat, ...)

Arguments

p

a datamaps object.

origin.lon, origin.lat

origin coordinates.

destination.lon, destination.lat

destination coordinates.

...

any other arguments to use as options.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
states <- data.frame(ori.lon = c(-97.03720, -87.90446),
    ori.lat = c(32.89595, 41.97960),
    des.lon = c(-106.60919, -97.66987),
    des.lat = c(35.04022, 30.19453),
    strokeColor = c("blue", "red"),
    arcSharpness = c(2, 1))

states %>%
    datamaps(scope = "USA", default = "lightgray") %>%
    add_arcs(ori.lon, ori.lat, des.lon, des.lat, strokeColor)

datamaps documentation built on May 2, 2019, 1:09 p.m.