Code for a scatterplot
plot(VN, VN, xlab=”VN”, ylab=”VN”)
To add a line of best fit to scatterplot
Library(readx1)
abline(Lm(VN~VN), col = “red”)
code for Z-score
codename$codename<-scale(VN, center=TRUE, scale=TRUE)
Code to turn off scientific notion for really small p-values
options(scipen = 999)
regression / ANOVA table
Model1 <- Lm(VN~VN)
summary(Model1)
code for Pearsons
cor.test(VN, VN)
code for Spearman’s
cor.test(VN, method= “spearman”)