Assuming that you have an input file called Input.txt
which contains the data in your question, this will get you pretty close. For your reference, you should look at the documentation to learn how to get stuff out of the chron
object.
# Aggregation
library(chron)
data = read.table("Input.txt", header=T, as.is =c(T,T))
data$Duration = chron(times=data$Duration)
processed = aggregate(Duration ~ Surgeon, data, sum)
print(processed)
# This will do total seconds, but you can change it to whatever you want to plot.
total_seconds = hours(processed$Duration) * 3600 + minutes(processed$Duration) * 60 + seconds(processed$Duration)
barplot(total_seconds, names.arg=processed$Surgeon)