本文介绍了在initFields中出现ggplot2错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
函数ggplotfrom包ggplot2给出以下错误:
$ b $ pre $ initFields(scales = scales)中的错误:
找不到函数initRefFields
通过其他列表并发现将ggplot2或R更新为v.14.2会使它工作,但是我做了两个,但仍然无法工作。任何提示?会话信息:
谢谢!
> sessionInfo()
R版本2.14.2(2012-02-29)
平台:x86_64-pc-mingw32 / x64(64位)
语言环境:
[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
附加基本软件包:
[1] stats graphics grDevices utils datasets methods base
其他附加软件包:
[1] plyr_1.7.1 ggplot2_0.9.0
通过名称空间加载(而不是附加):
[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
不是特别令人满意,但我通过将R升级到2.15解决了这个问题。编辑:根据@Brian Digg s,这是2.14中的一个已知问题,在2.14.1中修正。
The function ggplotfrom package ggplot2 gives the following error:
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. 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.
EDIT: According to @Brian Diggs, this is a known issue in 2.14, fixed in 2.14.1.
这篇关于在initFields中出现ggplot2错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
08-15 11:16