Skip to content
R for the Rest of Us Logo

This lesson is locked

Get access to all lessons in this course.

If the video is not playing correctly, you can watch it in a new window


Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

Your Turn

Complete the histogram sections of the data-visualization-exercises.Rmd file.

Learn More

Histogram Resources

You can find examples of code to make histograms on the Data to Viz website , the R Graph Gallery website , and in Chapter 6 of the R Graphics Cookbook , and Chapter 7 of the Fundamentals of Data Visualization.

To learn about more statistical transformations, Chapter 3 of R for Data Science has a discussion of them.

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Atlang Mompe

Atlang Mompe

April 5, 2021

Hi David, I don't think I quite understand bins - as when the graph changes from bins =100 to bins =10, I thought the x axis would change, so what exactly is being group? Thank you for the further clarification. Atty.

Kateryn Pino

Kateryn Pino

April 8, 2021

Hi David, everything is ok. Just this message appears... Removed 78 rows containing non-finite values (stat_bin). What is that mean?

Louise Blight

Louise Blight

April 9, 2021

There's an informational pop-up in the exercises file (at line 63 in my code) that reads " stat_bin() using bins = 30. Pick better value with binwidth ". Should this read bins instead of binwidth? I tried the latter and it seems to code for the actual width of the bins - no surprise I guess - instead of the number of bins we're adjusting in this exercise.