【发布时间】:2020-01-09 14:24:24
【问题描述】:
我是 R 的初学者。我在将计数放入条形图中时遇到问题。
所以我的数据看起来像这样
> head(worker)
stateur statemb state age tenure joblost
1 4.5 167 42 49 21 other
2 10.5 251 55 26 2 slack_work
3 7.2 260 21 40 19 other
4 NA 245 56 51 17 slack_work
5 6.5 125 58 33 1 slack_work
6 7.5 188 11 51 3 other
我已经使用此代码绘制了条形图
table=table(worker$joblost)
barplot(table, main = "Vertical Bar Plot of the Job Lost")
但我想将每个类别的失业频率放在每个条形的顶部。我能做什么?
【问题讨论】: