# data from Table 2.8.1 in the text before <- c(16.55, 15.36, 15.94, 16.43, 16.01) after <- c(16.05, 15.98, 16.10, 15.88, 15.91) # the Kolmogorov-Smirnov test (by default a two-sided test, p-value calculation depends on sample size) ks.test(before,after) # check the help file (type ?ks.test) for options rm(before, after) # remove objects when finished