Skip to content

Instantly share code, notes, and snippets.

@jebyrnes
Created September 27, 2012 19:56
Show Gist options
  • Save jebyrnes/3796118 to your computer and use it in GitHub Desktop.
Save jebyrnes/3796118 to your computer and use it in GitHub Desktop.
Martine's Code
enthus <- read.csv("enthusiasm.csv", header = TRUE)
# Plot the data
plot ( Chapters ~ Enthusiasm, data = enthus +
type = "p", pch = 20 +
main ="Holy Homework!" +
xlab = "Enthusiam units (week number)", xlim = c (0,3) + ylab = "Number of chapters", ylim = c (0,11))
# Fit regression line
abline (lm (Chapters ~ Enthusiasm, data = enthus))
# get equation for limera regression, R-squared and p-value
summary(lm(Chapters ~ Enthusiasm, data = enthus))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment