Hi R users, I am struggling to save the map with georeferenced (TIFF) that was imported from google map. I would be very grateful with your input. How can I save this image and reuse it when I need? I used the following code library(ggmap) library(mapproj) map <- get_map(location = 'Europe', zoom = 4) ggmap(map) writeRaster(map, filename = "texting.tif") but got the following message "Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ?writeRaster? for signature ?"gg", "character"?" thanks
How to save google map in r ?
3 messages · Kristi Glover, Bert Gunter, Rui Barradas
Please use search facilities before posting such questions here. I searched on "How to save google map in R" at rseek.org and got many relevant hits. If you have *already* done this, you should tell us why what you got did not suffice. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun, Nov 17, 2019 at 1:48 AM Kristi Glover <kristi.glover at hotmail.com> wrote:
Hi R users,
I am struggling to save the map with georeferenced (TIFF) that was
imported from google map. I would be very grateful with your input. How can
I save this image and reuse it when I need? I used the following code
library(ggmap)
library(mapproj)
map <- get_map(location = 'Europe', zoom = 4)
ggmap(map)
writeRaster(map, filename = "texting.tif")
but got the following message
"Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ?writeRaster? for
signature ?"gg", "character"?"
thanks
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Hello, See the docs: get_amp returns a ggmap object and ggmap returns a ggplot object. So ggsave() should do what you want. Hope this helps, Rui Barradas ?s 09:48 de 17/11/19, Kristi Glover escreveu:
Hi R users, I am struggling to save the map with georeferenced (TIFF) that was imported from google map. I would be very grateful with your input. How can I save this image and reuse it when I need? I used the following code library(ggmap) library(mapproj) map <- get_map(location = 'Europe', zoom = 4) ggmap(map) writeRaster(map, filename = "texting.tif") but got the following message "Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ?writeRaster? for signature ?"gg", "character"?" thanks [[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.