library(reshape2) DF = read.csv('../../Data/ASCII_Comma/Chapter_12/gasranges.txt', quote='\'') DF_melt = melt(DF, id.vars='Day', value.name='Energy', variable.name='Range') DF_melt$Day = as.factor(DF_melt$Day) fit = aov(Energy ~ Day * Range, data=DF_melt) print(summary(fit))