An Introduction to Data Analysis in R by Alfonso Zamora Saiz & Carlos Quesada González & Lluís Hurtado Gil & Diego Mondéjar Ruiz

An Introduction to Data Analysis in R by Alfonso Zamora Saiz & Carlos Quesada González & Lluís Hurtado Gil & Diego Mondéjar Ruiz

Author:Alfonso Zamora Saiz & Carlos Quesada González & Lluís Hurtado Gil & Diego Mondéjar Ruiz
Language: eng
Format: epub
ISBN: 9783030489977
Publisher: Springer International Publishing


In Fig. 4.13 we observe at a glance that the median of the petal width is a bit lower than 1.5, but the dispersion is quite big, the 50% of the central values being between 0.3 and 1.7. We see how skewed the distribution of this variable is, the range from the first quartile to the median is much bigger than the range from the median to the third quartile: variability of petal width in the study seems to be higher for lower values.

Fig. 4.13Box plot of the petal width from dataset iris

An interesting additional option of this function is the creation of several box plots in the same image for different categories, introducing another variable in the plot, in a similar way to the usage of variables in arguments in plot( ) . For example, as we explored in Sect. 4.1.1, the iris dataset has observations for three different species. We may want to compare position measures for the three species by simply picturing their respective box plots. To do so, boxplot( ) should be called connecting iris$Sepal.Length with iris$Species by means of the symbol ∼. This way, the boxplot( ) function separates Sepal.Length into as many subsets as different values of the second variable (the number of distinct species).



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.