*The second part of my code only generates the first plot. This is the error code I receive: * Error in [.data.frame(data, , 3) : undefined columns selected
Here is my code for the plots:
par(mfrow=c(1, 3))
plot(data[,1] ~ data[,2], main= "First Year GPA vs. ACT Score", xlab="ACT score", ylab="First Year GPA")
abline(lmACT, col="red")
plot(data[,1] ~ data[,3], main= "First Year GPA vs. Intel. Test Score", xlab="Intel. Test Score",
ylab="First Year GPA")
abline(lmIS, col="red")
plot(data[,1] ~ data[,4], main= "First Year GPA vs. H.S. Prec. Rank", xlab="Class Rank Percentile",
ylab="First Year GPA")
abline(lmCRP, col="red")
I hope I posted this correctly, and any help is much appreciated.
Thank you so much! I realize now I forgot to attach the dataset! I have forgotten so much due to having contracted a severe illness. I feel so silly now. Thank you again.