I want to visualize something on a map with ggmap, this is a part of my code:
sf <- c(lon = 5.291266, lat = 52.1326332)
register_google(key = "static-maps-backend.googleapis.com")
map <- get_map(location = sf, zoom = 14, scale = 2, maptype = c("terrain"))
But I keep getting this error :
Error in aperm.default(map, c(2, 1, 3)) :
invalid first argument, must be an array
So I looked it up and ran the code below
devtools::install_github("dkahle/ggmap")
After this I still got the same error as above. What can I do so this error is resolved?