############################################################################ # NAME: Chris Bilder # # DATE: 8-14-11 # # PURPOSE: Simple data analysis example in R using the gpa data set # # # # NOTES: # # # ############################################################################ #f(x) = x^2 curve(expr = x^2, from = -2, to = 1, n = 101, main = "Plot of f(x) = x^2", ylab = "f(x)", xlab = "x^2", col = "red") #A little smoother curve(expr = x^2, from = -2, to = 1, n = 1000, main = "Plot of f(x) = x^2", ylab = "f(x)", xlab = "x^2", col = "red") #Standard normal density curve(expr = dnorm(x = x, mean = 0, sd = 1), from = -4, to = 4, n = 1000, main = "Plot of standard normal density", ylab = "f(x)", xlab = "x", col = "red") abline(h = 0) #horizontal line at 0 #