Get access to all lessons in this course.
-
RMarkdown
- Why Use RMarkdown?
- RMarkdown Overview
- YAML
- Text
- Code Chunks
- Wrapping Up
-
Data Wrangling and Analysis
- Getting Started
- The Tidyverse
- select
- mutate
- filter
- summarize
- group_by
- count
- arrange
- Create a New Data Frame
- Crosstabs
- Wrapping Up
-
Data Visualization
- An Important Workflow Tip
- The Grammar of Graphics
- Scatterplots
- Histograms
- Bar Charts
- color and fill
- scales
- Text and Labels
- Plot Labels
- Themes
- Facets
- Save Plots
- Wrapping Up
-
Wrapping Up
- You Did It!
Fundamentals of R (v1)
Histograms
This lesson is locked
This lesson is called Histograms, part of the Fundamentals of R (v1) course. This lesson is called Histograms, part of the Fundamentals of R (v1) course.
If the video is not playing correctly, you can watch it in a new window
Transcript
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.
You need to be signed-in to comment on this post. Login.
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
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
April 9, 2021
There's an informational pop-up in the exercises file (at line 63 in my code) that reads "
stat_bin()
usingbins = 30
. Pick better value withbinwidth
". Should this readbins
instead ofbinwidth
? 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.