我有以下类型的数据框“df1”:
set.seed(2)
df1 = data.frame(Var1=rep(c('a','b','c','d'),3),
Var2=rep(c('aa','bb','cc'),each=4),
value=rnorm(12))
我尝试创建这个情节:
ggplot(df1) + geom_bar(aes(x=Var2,y=value),stat="identity") + facet_wrap(~Var1)
我收到以下我不明白的错误消息:
formal classes cannot be used without the methods package
怎么了 ?顺便说一句,我找不到名为方法的包。
这是我的 sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] fr_CH.UTF-8/fr_CH.UTF-8/fr_CH.UTF-8/C/fr_CH.UTF-8/fr_CH.UTF-8
attached base packages:
[1] utils graphics methods stats base
other attached packages:
[1] agricolae_1.1-4 reshape2_1.2.2 lattice_0.20-15 ggplot2_0.9.3.1 data.table_1.8.8
loaded via a namespace (and not attached):
[1] colorspace_1.2-2 datasets_3.0.1 dichromat_2.0-0 digest_0.6.3 grDevices_3.0.1 grid_3.0.1 gtable_0.1.2
[8] labeling_0.1 lme4_0.999999-2 MASS_7.3-26 Matrix_1.0-12 munsell_0.4 nlme_3.1-109 plyr_1.8
[15] proto_0.3-10 RColorBrewer_1.0-5 scales_0.2.3 stats4_3.0.1 stringr_0.6.2 tools_3.0.1
谢谢