June 2016
Beginner to intermediate
1783 pages
71h 22m
English
Histograms can represent the distribution of values either as frequency (the absolute number of times values fall within specific ranges) or as probability density (the proportion of the values that falls within specific ranges). In this recipe, we will learn how to choose one or the other.
We are only using base graphics functions for this recipe. So, just open up the R prompt and type in the following code. We will use the airpollution.csv example dataset for this recipe. So, let's first load it:
air<-read.csv("airpollution.csv")We will use the hist() base graphics function to make our histogram, first showing the frequency and then probability ...
Read now
Unlock full access