An example script

Here's an example R script that we will be referring to for the rest of the chapter:

#!/usr/bin/Rscript --vanilla ########################################################### ## ## ## nyc-sat-scores.R ## ## ## ## Author: Tony Fischetti ## ## tony.fischetti@gmail.com ## ## ## ########################################################### ## ## Aim: to use Bayesian analysis to compare NYC's 2010 ## combined SAT scores against the average of the ## rest of the country, which, according to ## FairTest.com, is 1509 ## # workspace cleanup rm(list=ls()) # options options(echo=TRUE) options(stringsAsFactors=FALSE) # libraries library(assertr) # for data checking library(runjags) # for MCMC # make sure everything is all set with JAGS ...

Get Data Analysis with R - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.