library(reshape2) DF_orig = read.csv('../../Data/ASCII_Comma/Chapter_12/tablets1.txt', quote='\'') DF_orig_melt = melt(DF_orig, id.vars=c(), variable.name='Laboratory', value.name='Measurement') print(sd(DF_orig_melt$Measurement)) # matches the estimate of s_p on Page 486 I = 7 # the number of laboratories J = 10 # the number of samples per laboratory I*(J-1) k = choose(I, 2) # the number of comparisons for the Bonferroni test