Are you dead set on using {ggmap}? Its geocoding function is built against Google API, which has gotten much bad rep recently.
There are other backends available though, among others Open Street Map accessible via {tmaptools} package.
If you are after something like the linked example from 2013 you may wish to consider something along these lines, built on more current toolset but giving a comparable result:
library(tmap)
library(tmaptools)
data("World") # for the basemap
cities <- tmaptools::geocode_OSM(c("New York", "Prague", "Lagos"), # or what not :)
as.sf = T)
tm_shape(World) + tm_polygons() +
tm_shape(cities) + tm_bubbles(col = "red")