Skip to content

Instantly share code, notes, and snippets.

View ryanburge's full-sized avatar

Ryan Burge ryanburge

View GitHub Profile
Here's the data link:
simon <- read.csv(url("http://goo.gl/exQA14"))
Here's the link to the codebook:
http://opensiuc.lib.siu.edu/cgi/viewcontent.cgi?article=1010&context=ppi_statepolls
Install these pacakges:
install.packages("dplyr")
install.packages("car")
@ryanburge
ryanburge / 03062017
Last active March 6, 2017 21:00
Instructions for Class: 3/6/2017
Here's the data link:
simon <- read.csv(url("http://goo.gl/exQA14"))
Here's the link to the codebook:
http://opensiuc.lib.siu.edu/cgi/viewcontent.cgi?article=1010&context=ppi_statepolls
install.packages("dplyr")
install.packages("car")
install.packages("ggplot2")
install.packages("descr")
@ryanburge
ryanburge / 3.6.2017Markdown.txt
Last active March 6, 2017 22:12
Here's the RMarkdown Syntax for 3/6/2017
---
title: "Here is a Title"
author: "Ryan Burge"
date: "March 6, 2017"
output: html_document
---
@ryanburge
ryanburge / 03082017.txt
Created March 8, 2017 19:24
First Coding Assignment
## This is due on 3/17 in the Dropbox on D2L
## Use Rmarkdown to complete this assignment
## Please upload the .html file
Refer to the following Rmarkdown file for a template: https://gist.github.com/ryanburge/1bce7a48995cbf82995668c5c3e18d2c
1. What is the code that you would use to give me a frequency table for the following question:
“Do you favor or oppose cuts in state spending on state universities?”
@ryanburge
ryanburge / ipak.R
Created March 11, 2017 17:45 — forked from stevenworthington/ipak.R
Install and load multiple R packages at once
# ipak function: install and load multiple R packages.
# check to see if packages are installed. Install them if they are not, then load them into the R session.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@ryanburge
ryanburge / 03202017.txt
Last active March 19, 2017 02:11
Instructions for Class on March 20, 2017
## RUN ALL THIS SYNTAX BEFORE WE START
## This will install and load all the packages you need for class today.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@ryanburge
ryanburge / 04032017.txt
Last active April 3, 2017 18:44
Instructions for 4/3/2017
## RUN ALL THIS SYNTAX BEFORE WE START
## This will install and load all the packages you need for class today.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@ryanburge
ryanburge / 03272017.txt
Last active April 9, 2017 18:21
Classroom Instructions for 3/27/2017 - Correlations and Scatterplots
## RUN ALL THIS SYNTAX BEFORE WE START
## This will install and load all the packages you need for class today.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@ryanburge
ryanburge / 03212017.txt
Last active April 9, 2017 18:21
Class Instructions for 3/22/2017 - dplyr practice
## RUN ALL THIS SYNTAX BEFORE WE START
## This will install and load all the packages you need for class today.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@ryanburge
ryanburge / Assignment_2.txt
Last active April 10, 2017 19:09
Here is Assignment 2. It will be due on April 16th by 8 PM.
---
title: "Assignment 2"
author: "YOUR NAME"
date: "April 10, 2017"
output: html_document
---
```{r message=FALSE, warning=FALSE}
library(ggplot2)