Export an object of class ggmap in R -


i need use map load ggmap in lab there's no internet. wondering if there's read.table function type of object.

this code i'have try:

mtl <- get_map(location = c(lon = -73.705951 , lat = 45.541598), zoom = 11                 , maptype = "terrain",                 source = "google", color = "color")  save(mtl, file="mtlmap.rdata") test <- load("mtlmap.rdata")  ggmap(test) 

and error:

error: ggmap plots objects of class ggmap, see ?get_map 

thanks!

perhaps use save , load?

myggmap <- get_googlemap(...) #add params here  save(myggmap, file="tmp1.rdata") rm(myggmap) load("tmp1.rdata") ggmap(myggmap) 

or bit fancier:

if(file.exists("tmp1.rdata")&file.info("tmp1.rdata")$size>0) load("tmp1.rdata") 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -