Tuesday, November 20, 2012

Simple vector analysis in R

First, create a vector:

ClassGrades<- c(94, 95, 91)
#defines a vector called "ClassGrades" by concatenating individual grades on the exam

Then, run your simple analysis

mean(ClassGrades)
#returns the mean on the exam

hist(GlassGrades)
#produces a histogram of the exam grades

No comments:

Post a Comment