> corr.V2.V3 = function(x) { > out = cor(x$V2, x$V3) > names(out) = "CORR" > return(out) > } A litte more concisely: corr.V2.V3 = function(x) { c(CORR = cor(x$V2, x$V3)) } -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/