load leaflet library and plot the map

The leaflet R package allows to create a leaflet maps without needing to know any Javascript!

library("leaflet")

m <- leaflet() %>%
  addTiles() %>%  # Add default OpenStreetMap map tiles
  addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")
m  # Print the map