Many questions seem similar to mine, I could not however find a fitting answer for R.
So far, I use the awesome R leaflet (and ggmap) package that way:
library(ggmap)
library(leaflet)
coord <-geocode('New York')
map.city <- leaflet() %>%
addTiles('http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey=68c4cd328d3b484091812a76fae093fd') %>%
setView(coord$lon, coord$lat, zoom = 11)
But what if I want as a map the Google satellite?
I went through this post
https://mcmap.net/q/296131/-leaflet-map-api-with-google-satellite-layer-duplicate#=
but don't understand how to use the googleSat function defined there.
map.city <- leaflet() %>% addProviderTiles('Esri.WorldImagery') %>% setView(coord$lon, coord$lat, zoom = 11)
– Parflechemap.city <- leaflet() %>% addProviderTiles('Esri.WorldImagery') %>% setView(coord$lon, coord$lat, zoom = 11); map.city %>% addProviderTiles("CartoDB.PositronOnlyLabels")
– Parfleche