So basically I need to generate a bar plot that tracks absentee hours by month given a csv data set. I've tried a lot of variations, but this is what I currently have:
df = read.csv("Absenteeism_at_work.csv",sep=";",header=TRUE)
tabledata <- table(df$Absenteeism.time.in.hours,df$Month.of.absence)
barplot(tabledata[,-1],main="Absent Hours by Month",
xlab="Month",
ylab="Total Hours Absent",
col="Red")
However, I believe this is just giving me frequency by month, and I need to figure out how to put df$absenteeism.time.in.hours as a sum value on the y axis without using ggplot. Any advice on how to set the sum of absenteeism.time.in.hours as the y axis would be appreciated.