POL 300: Lab 2

Author

Dr. Annie Karreth

This page contains R code for Lab 2.

Instructions

To complete this lab:

  • create a new R script on your computer
  • save it under the name POL 300 Lab 2.R
  • copy and paste the code from this page (in the gray boxes) into the script
  • comment the code as instructed during the lab

Code

install.packages("RCPA3")
library(RCPA3)
setwd(dirname(rstudioapi::getSourceEditorContext()$path))
getwd()
View(states)
states$ba.or.more

mean(states$abortion.rate)

table(states$abortlaws.3cat)
describeC(x=region, data=world)

freqC(x=region, data=world)
describeC(x = infant.mortality, data = world)