Created
October 21, 2020 01:52
-
-
Save njtierney/330b0a552b49f38cdd0413afc6896baa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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