# ReadingPaired Example -- reading-paired.R source code. # Read data from input file. scores <- read.table("reading-paired.txt", header=TRUE) std <- scores$Standard new <- scores$New # Print data. cat("Scores of students taught with standard teaching method:\n") print(std) cat("Scores of students taught with new teaching method:\n") print(new) # Perform paired two-sample t-test. ttest <- t.test(std, new, alternative="two.sided", paired=TRUE, conf.level=0.95) print(ttest)