How can I use apply or a related function to create a new data frame that contains the results of the row averages of each pair of columns in a very large data
apply
The rowMeans solution will be faster, but for completeness here's how you might do this with apply:
rowMeans
t(apply(dat,1,function(x){ c(mean(x[1:3]),mean(x[4:6])) }))