我得到一个 csv 文件,其中包含如下数据:
> "value","name"
> 403.375,"C1"
> 409.625,"C1"
> 300.5,"C11"
> 321.125,"C11"
> 740.25,"C2"
> 718.875,"C2"
> 303.25,"Q"
> 323,"Q"
> 146.875,"H1"
> 171.75,"H1"
> 210.875,"H2"
> 234.625,"H2"
> 1640,"CQ1"
> 1742.5,"CQ1"
> 2319.875,"CH1"
> 2449,"CH1"
> 1227.25,"CH2"
> 1157.375,"CH2"
> 781,"CQ1.1"
> 715.125,"CQ1.1"
> 713.125,"CH1.1"
> 670.25,"CH1.1"
如何按名称获取值的平均值,如下所示:
> "mean","name"
> 406.5,"C1"
> 310.8125,"C11"
> ... ...
并让条形图在 R 中按名称显示平均标签?