R ggmap Error: object 'f' not found

4.2k views Asked by At

After I install rnoaa packages, my ggmap package is not working. I couldn't even do the simple example:

>library(ggmap)

>qmap(location = "boston university")

Error in get("f", environment(CoordMap$train)) : object 'f' not found

Does anyone have the same problem? Thank you!

6

There are 6 answers

0
damonzon On

I also had the problem with ggmap not working. Using the CRAN package "version", I saw that my installed version was 2.6.1, claimed by CRAN to be the latest version. But on GitHub I discovered version 2.7, downloaded it with devtools, and now my code is working.

0
Minchun Zhou On

My colleague fix this problem by installing the old version of ggmap. ggmap updated on 2016-01-23. The old version from 2015-12-19 works fine. For those who have the same problem, go to link below and download the old version of ggmap. It should fix the problem.

https://cran.r-project.org/web/packages/ggmap/index.html

0
Frankie On

You can go to this link and reinstall the packages again.It should solve the problem.

1
Chrisftw On
  1. Reinstall R and R Studio
  2. Library(devtools) devtools::install_github("dkahle/ggmap") devtools::install_github("hadley/ggplot2")

Had the same error, and works fine now.

0
MarMar On

I had this problem as well, uninstalling ggplot2 and reinstalling it from CRAN worked for me.

0
mlevy On

Reverting to ggplot v. 2.2.0 worked for me: devtools::install_github("hadley/[email protected]")