Search code examples
rggplot2ggmap

R: Error in get_map() from ggmap


I am trying to plot a simple map in R using function get_map() for a certain location. Following is my code :

e.g.

get_map(location = "texas", zoom = 10, source = "google")

I've tried different parameters. The error I'm getting is following:

Error in aperm.default(map, c(2, 1, 3)) : 
perm' is of wrong length 3 (!= 2)

What is exactly happening in the background & how do I fix it? I checked all the possible blogs I could, no one seems to get this error.

Please help!


Solution

  • This error occurs due to the base url. In CRAN version , the base url is not secure. Use dev version of this package from {github} instead & function runs fine. Use devtools::install_github(""dkahle/ggmap") to install library from github