studentid = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) names(studentid) <- studentid
whswt = c(2, 2.5, 3, 3, 5, 6, 10, 15, 18, 20) names(whswt) <- whswt
gpa = c(4, 4, 3.8, 3.5, 3.6, 3.2, 3.2, 2.8, 2.6, 2.7) names(gpa) <- gpa
student_whswt_gpa = data.frame(studentid, whswt, gpa)
str(student_whswt_gpa)
head(student_whswt_gpa)
help(cor.test)
plot(whswt, gpa, main=“scatterplot”)
cor( whswt, gpa)
studentid = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
names(studentid) <- studentid
whswt = c(2, 2.5, 3, 3, 5, 6, 10, 15, 18, 20)
names(whswt) <- whswt
gpa = c(4, 4, 3.8, 3.5, 3.6, 3.2, 3.2, 2.8, 2.6, 2.7)
names(gpa) <- gpa
plot(whswt, gpa)
mean(whswt) sqrt(whswt)
mean(gpa) sqrt(gpa)