Created
September 13, 2013 03:45
-
-
Save myuen/6546602 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a <- 2 | |
b <- -3 | |
sigSq <- 0.5 | |
x <- runif(40) | |
y <- a + b * x + rnorm(40, sd = sqrt(sigSq)) | |
(avgX <- mean(x)) | |
write(avgX, file="avgX.txt") | |
plot(x, y) | |
abline(a, b, col = "purple") | |
dev.print(pdf, "toylinePlot.pdf") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment