Skip to content

Instantly share code, notes, and snippets.

@dgkeyes
Created April 25, 2019 22:11
Show Gist options
  • Save dgkeyes/e5c27968b3468bf07820c75aae205b52 to your computer and use it in GitHub Desktop.
Save dgkeyes/e5c27968b3468bf07820c75aae205b52 to your computer and use it in GitHub Desktop.
histogram solutions
# Histogram
Make a histogram that shows the distribution of the weight variable.
```{r}
ggplot(data = nhanes,
mapping = aes(x = weight)) +
geom_histogram()
```
Copy your code from above, but adjust it so that there are 50 bins.
```{r}
ggplot(data = nhanes,
mapping = aes(x = weight)) +
geom_histogram(bins = 50)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment