绘制条图
Use the barplot function. The first argument is a vector of bar heights:
公卫家园
> barplot(c(height1, height2, height3))so it’s common to add some simple adornments: a title, labels for the bars,
and a label for the y-axis:
公卫论坛
> barplot(heights,
+ main="Mean Temp. by Month",
+ names.arg=c("May", "Jun", "Jul", "Aug", "Sep"),
公卫家园
+ ylab="Temp (deg. F)")
The barchart function in the lattice package is another way to produce a bar chart.
附件列表
词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。