This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(haven) | |
chs2019_public <- read_sas("~/Downloads/chs2019_public.sas7bdat", | |
NULL) | |
library(Hmisc) | |
library(descr) | |
library(haven) | |
chs2020_public <- read_sas("~/Downloads/chs2020_public.sas7bdat", | |
NULL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you should not need to do ths, try having them make a project? Because setwd() is considered bad practice. | |
setwd("~/R_Program_Folder") | |
# all the amazon code here | |
Sys.setenv("AWS_ACCESS_KEY_ID" = "xxxxx", | |
"AWS_SECRET_ACCESS_KEY" = "xxxxxx", | |
"AWS_DEFAULT_REGION" = "us-west-2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(aws.s3) | |
Sys.setenv("AWS_ACCESS_KEY_ID" = "XXXX", | |
"AWS_SECRET_ACCESS_KEY" = "XXXX", | |
"AWS_DEFAULT_REGION" = "us-west-2") | |
s3load('nycyrbs.RData', bucket = 'XXXX') | |
nycyrbs <- subset(nycyrbs, select = c(q33, q34, q35, grade)) | |
nycyrbs[nycyrbs==""]<-NA | |
skimr::skim(nycyrbs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```{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') | |
``` |