Skip to content

Instantly share code, notes, and snippets.

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)
# 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")
@elinw
elinw / YRBS
Last active November 5, 2022 01:35 — forked from naomispence/YRBS
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)
```{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')
```