The source code is available at GitHub. Click here!

My Leaflet Map

Create leaflet map object.

library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(leaflet)
my_map <- leaflet() %>% addTiles()

Add marker to the map and display map.

my_map %>%
   addTiles() %>%
   addMarkers(lat=12.5665, lng=-70.0475, popup = "Riu Palace")