Instead of qmap
, using get_map
and ggmap
functions also works.
library(ggmap)
myfunction<-function(thezoom=14){
ggmap(get_map(location = 'baylor university', zoom = thezoom))
}
myfunction() # Draws a map with zoom set to 14
myfunction(10) # Draws a map with zoom set to 10