Skip to content

Instantly share code, notes, and snippets.

@elinw
Forked from naomispence/histograms hompop unrelat
Last active October 18, 2017 18:09
Show Gist options
  • Save elinw/548722219ebfdc6e8057e41a46b88c7d to your computer and use it in GitHub Desktop.
Save elinw/548722219ebfdc6e8057e41a46b88c7d to your computer and use it in GitHub Desktop.
```{r}
#YOU WILL ALWAYS NEED THIS FIRST CHUNK. WE WILL ADD TO IT DURING THE SEMESTER.
#THIS CHUNK LOADS THE LIBRARIES AND DATA THAT YOU NEED FOR YOUR WORK.
library(aws.s3)
library('lehmansociology')
library('ggplot2')
library('dplyr')
s3load('gss.Rda', bucket = 'lehmansociologydata')
```
```{r}
summary(GSS$unrelat)
ggplot(data = GSS) +
geom_histogram(color=" yellow", fill="yellow ", binwidth = 1,
aes(x = unrelat, y = ..ncount..), na.rm = TRUE) +
scale_x_continuous(breaks = seq(0, 7, 1), limits = c(-1, 8)) +
ggtitle("title ") +
labs(y=" label", x="label ")
ggplot(data = GSS) +
geom_histogram(color=" yellow", fill="yellow ", binwidth =1,
aes( x = unrelat, y = ..ncount..), na.rm = TRUE) +
scale_x_continuous(breaks = seq(0, 7, 1), limits = c(-1, 8)) +
ggtitle("title ") +
labs(y=" label", x="label ")
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment