Like Us on FacebookFollow Us on TwitterSubscribe to Us on Youtube!Join Us on Google+

Boxplots and Boxplots with Groups in R: (R Tutorial 2.2)


In this video, you will learn how to produce boxplots as well as side-by-side boxplots for multiple groups. You will also learn how to modify these plots to better demonstrate your data.

Here we will explain what a boxplot is and when it is appropriate to use a boxplot for your data. In this tutorial you will also learn to produce a boxplot in R using "box.plot" command and report the minimum, first quartile, median, third quartile, and the maximum in a boxplot using "quantile" command. This video will show you how to modify boxplots in R to better demonstrate your date, for example by adding a title using "main" argument, labeling the x-axis or the y-axis using "xlab" or "ylab" arguments, changing the limits for the y-axis using "ylim" argument, and rotating the values on the y-axis using "las" argument. 

This tutorial also shows how to produce side-by-side boxplots (boxplots with groups) in R using "boxplot" and "~" (separate) commands, or using the square brackets to subset. For example when you are comparing the distribution of a numeric variable for different groups that are formed by a categorical variable this plot will be useful. You can further modify the boxplot with groups, for example by adding a title to the plots using "main" argument and more.

We recommend using the link below to download the dataset and practice on your own while watching this tutorial.


You can access and download the dataset that was used in this tutorial here:

  Tab Delimited Dataset for R TutorialsExcel Dataset for R Tutorials

Previous Video in Series 2 R Tutorials Next Video in Series 2 R Tutorials

Back to Series 2 R Tutorials