i

R Programming Complete Tutorial

R Boxplots

Boxplots are a measure of how well distributed the data is in the data set. It divides the data set into three quantities. This graph can also help us to get the detail of outliers from box plots. Boxplots are created in R using the boxplot () function.

Example of boxplot() Function:

We use the data set iris available in the R environment to create a basic boxplot. We will work with Sepal.Width column of iris data set.

From the graph output, we can see that data above the median is dispersed; we can also notice three outliers at the higher and one in the lower extreme.

Graph output: