add_labs: Labs for a r2d3 map

Description Usage Arguments Value Examples

Description

Labs for a r2d3 map

Usage

1
add_labs(map, title = NULL, caption = NULL)

Arguments

map

A r2d3map htmlwidget object.

title

The map title.

caption

Brief explanation of the source of the data.

Value

A r2d3map htmlwidget object.

Examples

1
2
3
4
5
6
7
8
9
library( r2d3maps )
library( rnaturalearth )

ireland <- ne_states(country = "ireland", returnclass = "sf")
d3_map(shape = ireland) %>%
  add_labs(
    title = "Ireland",
    caption = "Data from NaturalEarth"
  )

dreamRs/r2d3maps documentation built on May 25, 2019, 8:17 a.m.