简体   繁体   English

ggplot2 initFields出错

[英]ggplot2 Error in initFields

The function ggplotfrom package ggplot2 gives the following error: 函数ggplotfrom包ggplot2给出以下错误:

Error in initFields(scales = scales) : 
cannot find function "initRefFields"

Went through other lists and found that updating ggplot2 or R to v.14.2 would make it work, however I did both, and still does not work. 通过其他列表,发现更新ggplot2或R到v.14.2将使它工作,但我做了两个,但仍然无法正常工作。 Any hint? 任何提示? there goes session info: THANKS! 有会议信息:谢谢!

> sessionInfo()
R version 2.14.2 (2012-02-29)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Spanish_Spain.1252  LC_CTYPE=Spanish_Spain.1252            LC_MONETARY=Spanish_Spain.1252
[4] LC_NUMERIC=C                   LC_TIME=Spanish_Spain.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] plyr_1.7.1    ggplot2_0.9.0

loaded via a namespace (and not attached):
[1] colorspace_1.1-1   dichromat_1.2-4    digest_0.5.2       grid_2.14.0            MASS_7.3-16       
[6] memoise_0.1        munsell_0.3        proto_0.3-9.2      RColorBrewer_1.0-5    reshape2_1.2.1    
[11] scales_0.2.0       stringr_0.6        tools_2.14.0 

Not particularly satisfying, but I solved this by upgrading R to 2.15. 不是特别令人满意,但我通过将R升级到2.15来解决这个问题。

EDIT: According to @Brian Diggs, this is a known issue in 2.14, fixed in 2.14.1. 编辑:根据@Brian Diggs,这是2.14中的一个已知问题,修正于2.14.1。

Both @Agnus and @Amy seem to have had a problem with their installation/upgrade. @Agnus和@Amy似乎都遇到了安装/升级问题。 Note that in both cases, the version of grid and tools listed is 2.14.0 . 请注意,在这两种情况下,列出的gridtools的版本是2.14.0 These two packages ship with base R and should have the same version as R ( 2.14.2 or 2.15.0 ). 这两个软件包附带基础R,应该与R( 2.14.22.15.0 )具有相同的版本。 This indicates to me that the standard packages did not get installed correctly, or something is causing the R installation to look in the wrong place for the core libraries. 这向我表明标准软件包没有正确安装,或者某些东西导致R安装在核心库的错误位置。

I'm not sure what could cause this, or how to fix it short of installing the standard R (Windows, in both cases) distribution (again). 我不确定是什么导致这种情况,或者如何解决它没有安装标准R(Windows,在这两种情况下)分发(再次)。

When copying libraries during upgrade from 2.14 to 2.14.2 or 2.15.x and doing the upgrade packages story as described in the FAQs, "tools" and "grid" are not updated back to the new version, thus, the old version 2.14 remains. 在从2.14升级到2.14.2或2.15.x期间复制库并执行常见问题解答中描述的升级包故事时,“工具”和“网格”不会更新回新版本,因此,旧版本2.14仍然存在。 This causes the trouble. 这会引起麻烦。 A clean install or a re-install of 2.15.x eliminates the problem. 干净安装或重新安装2.15.x消除了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM