The Hot Dog Eating example gives a good idea how to work with R to make bargraphs.
Try the author's program bars.R or see
Activity One: bars.Rmd
- Note the use of the for loop and the if-then-else statement to color specific bars in the graph
- Note the use of the time labeling.