gf_histogram()

gf_histogram()

The gf_histogram() function will create a frequency histogram for a quantitative variable. This means it will show the number of cases observed in the data for each value of the variable. (See gf_dhistogram() for information on density histograms).

Example:

# Create a histogram of Thumb lengths

gf_histogram( ~ Thumb , data = Fingers , fill = "orange", color = "gray", bins = 10 )


Example output:
histogram of thumb lengths