New to R and trying to figure out the barplot.
I am trying to create a barplot in R that displays data from 2 columns that are grouped by a third column.
DataFrame Name: SprintTotalHours
Columns with data:
OriginalEstimate,TimeSpent,Sprint
178,471.5,16.6.1
210,226,16.6.2
240,195,16.6.3
I want a barplot that shows the OriginalEstimate
next to the TimeSpent
for each sprint.
I tried this but I am not getting what I want:
colours = c("red","blue")
barplot(as.matrix(SprintTotalHours),main='Hours By Sprint',ylab='Hours', xlab='Sprint' ,beside = TRUE, col=colours)
abline(h=200)
I would like to use base graphics but if it can't be done then I am not opposed to installing a package if necessary.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…