Introduction

About

This website is intended as a quick reference for some techiques that I think I may need when cleaning, analyzing, or presenting data. For a more basic intro to R try the R for Social Science Data Carpentry Workshop , on which some of this website is based.

Setting up

This book uses the SAFI data set, and a large number of libraries. The following will download them all. I use the here package to manage paths.

#make sure your working folder is set to something sensible!

file.create(".here")
here::i_am(".here")
library(here)

dir.create(here("data"))

download.file(
  "https://raw.githubusercontent.com/datacarpentry/r-socialsci/main/episodes/data/SAFI_clean.csv",
  here("data/SAFI_clean.csv"), mode = "wb"
)

install.packages(c("tidyverse","here","arsenal","lmtest","sandwich","here",
                   "huxtable","flextable","declaredesign","fixest"))