Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quick graphs

  • barplot
  • plot
  • hist
  • boxplot
  • pie
distances = c(11, 15, 7, 23, 9)
barplot(distances)
plot(distances)
hist(distances)
boxplot(distances)
pie(distances)


barplot(distances, col="purple")
barplot(distances, col="#2323AA")
barplot(distances, col="#2323AA", ylab="Text on Y", xlab="Text on X")

  • Will create a file called Rplots.pdf.