POLISCI 811
1
Introduction
2
Setting Up
2.1
Installing R
2.2
Installing RStudio
2.3
Installing LaTeX
2.4
Knitting R Markdown Files
2.5
Creating a Github Account
2.6
Setting Up Git
2.7
Connecting RStudio to Git and Github
2.7.1
Say hello to git on RStudio
2.7.2
Create a repository
2.7.3
Connect Github to RStudio (the fun part)
2.8
Working with Git on RStudio
2.8.1
How does this all work?
2.8.2
Check if things happened as expected
3
Workflow
3.1
Why create a project?
3.2
Creating a project in RStudio
3.3
Pushing a R Markdown document to your Github repository
3.4
Writing a paper in R Markdown
3.4.1
Prerequisites
3.4.2
Installing papaja
3.4.3
Opening the template
3.4.4
Getting to know your APA R Markdown template
3.5
Let’s talk about code chunks
3.6
Code chunks in the papaja template
3.7
Body of the papaja template
4
Bibliography
4.1
Downloading Zotero
4.2
Downloading Better Bibtex for Zotero
4.3
Loading the citr package
5
Git Branches
5.1
Creating a branch
5.2
Working in the branch
5.3
Deleting the branch
5.4
Restoring the branch
5.5
Using Git on the command line
6
Functions
6.1
Loops
6.1.1
Using loops in a dataset
6.1.2
Vectorizing the process
6.2
Applying lapply()
6.3
Indexing your list
6.4
Scoped verbs
6.4.1
Using if()
6.4.2
Using at()
6.4.3
Defining your own functions
6.4.4
Applying more than one function
6.5
Nesting data frames
7
Base R vs. Tidyverse
7.1
But first, what’s Tidyverse?
7.2
R basics
7.2.1
Use R as a calculator
7.2.2
Creating objects
7.2.3
Creating vectors
7.3
Loading data into R
7.4
Comparing base R vs. Tidyverse
7.4.1
Base R
7.4.2
Tidyverse
8
Data Manipulation
8.1
Install packages
8.2
Read data
8.3
Understand data frames
8.3.1
Data frame exercise
8.4
Use tidyverse for data manipulation
8.4.1
Rename data variables
8.4.2
Create new data variables
8.4.3
Logical operators
8.4.4
Same function, multiple conditions
8.4.5
Select columns
8.5
Filter data
8.5.1
Summarize data
8.5.2
Sort data
8.5.3
Merge datasets
8.5.4
View tables
8.5.5
Group variables
8.5.6
Reshape data
9
Graphics
9.1
I am going to pay lip service to the comparativists…
9.2
base R graphs
9.2.1
Scatter plots
9.2.2
Box plots
9.2.3
Bar plots
9.2.4
Line plots
9.2.5
Histogram and density plots
9.2.6
Pie charts
9.3
World of
ggplot2
9.3.1
Load packages
9.3.2
Load dataset
9.3.3
Components
9.3.4
Create plot
9.3.5
Populate plot
9.3.6
Aesthetics
10
Analysis
10.1
Load packages
10.2
Load data
10.3
Rename variables
10.4
Descriptive analysis
10.4.1
Descriptive graph
10.5
Data summary
10.6
Regression analysis
10.6.1
Linear regression
10.6.2
Diagnostic plots
10.6.3
Linear regression with standard errors
10.6.4
Logit regression
11
Tools
12
Replication
13
GitHub Pages
13.1
What’s so great about GitHub Pages?
13.2
Who uses GitHub Pages?
13.3
Steps to get your GitHub Pages up & running
13.3.1
Prerequisites
13.3.2
Step 1: Install Hugo
13.3.3
Mac Users
13.3.4
Step 2: Create site
13.3.5
Step 3: Add theme
13.3.6
Step 4: Add content
13.4
Step 5: Fire up the Hugo server
13.4.1
Step 6: Configure your site
13.4.2
Step 7: Build pages
13.4.3
Step 8: Create repositories on GitHub
13.4.4
Step 9: Pull git repository on to your computer
13.4.5
Step 10: Change public-facing location
13.4.6
Step 11: Create public-facing location
13.4.7
Step 12: Execute changes
13.4.8
Step 13: Check out your site
14
Bookdown
Published with bookdown
Introduction to Statistical Computing in Political Science
12
Replication
Here’s a replication project.