philswatton / ESS2022-1X-Intro-To-R

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESS2022-1X-Intro-To-R

This is a repository for the class files I used in teaching the class 1X Introduction to R in the 2022 Essex Summer School's first session. The materials are largely the same as my 2X class from last year with some updates and error corrections.

The class covers the basics of getting started in R, including using scripts, using RStudio, using R projects to set the file path for a project, data types, R's data structures, importing data, managing datasets with dplyr, and some basic statistical tests and models.

Since this class is for a 6-hour crash-course, the emphasis is on covering enough ground that students can read helpfiles, stackexchange threads, complete other ESS courses, etc. To that end a lot of code is offered with a lot of comments covering both the basics of base R and the tidyverse.

The scripts are written in such a way as to be followed in order. The data folder contains all datasets expect the Chapel Hill Expert Survey (see below). The solutions folder contains code solutions for the exercises at the end of each file.

Data

aoe <- read.csv("data/match_players.csv")
set.seed(42)
aoe <- aoe[as.logical(rbinom(nrow(aoe), 1, 0.01)),]
write.csv(aoe, "data/match_players.csv")

Resources

About


Languages

Language:R 100.0%