June 2016
Beginner to intermediate
1783 pages
71h 22m
English
In this recipe, you will learn how to make histograms and density plots, which are useful to look at the distribution of values in a dataset.
The simplest way to demonstrate the use of a histogram is to show a normal distribution:
hist(rnorm(1000))

Another example of a histogram is one that shows a skewed distribution:
hist(islands)

The
hist() function is also a function of R's base graphics library. It takes only one compulsory argument, that is, the variable whose distribution of values ...
Read now
Unlock full access