R ggmap Error: object 'f' not found

a 夏天 提交于 2019-12-12 10:56:12

问题


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:


  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.




回答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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!