I am a beginner in R. I am having problem in putting the count in my bar plot.
So my data look like this
> 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
I have plot the bar graph by using this code
table=table(worker$joblost)
barplot(table, main = "Vertical Bar Plot of the Job Lost")
But I want to put the frequency for each category of joblost on top of each bar. What can I do?

