问题
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!
回答1:
Reverting to ggplot v. 2.2.0 worked for me: devtools::install_github("hadley/ggplot2@v2.2.0")
回答2:
- Reinstall R and R Studio
Library(devtools) devtools::install_github("dkahle/ggmap") devtools::install_github("hadley/ggplot2")
Had the same error, and works fine now.
回答3:
I had this problem as well, uninstalling ggplot2 and reinstalling it from CRAN worked for me.
回答4:
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
回答5:
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.
回答6:
You can go to this link and reinstall the packages again.It should solve the problem.
来源:https://stackoverflow.com/questions/41886948/r-ggmap-error-object-f-not-found