Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
library(leaflet)
leaflet() %>%
addTiles() %>% # Add default OpenStreetMap map tiles
addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")
add_birthplace_marker <- function(map, popup = "The birthplace of R"){
map %>%
addMarkers(lng=174.768, lat=-36.852, popup= popup)
}
leaflet() %>%
addTiles() %>% # Add default OpenStreetMap map tiles
add_birthplace_marker()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment