Below example has 4 sets of triplicates, without using for loop and iteratively cbind the columns, what is the "R-approach" of generating a matrix of 8 columns that are the averages and standard deviations ? The average and standard deviation columns should be side by side i.e. A.mean A.sd B.mean B.sd C.mean C.sd D.mean D.sd > t <- matrix(rnorm(120), ncol=12)> (colnames(t) <- paste(rep(LETTERS[1:4], > each=3), 1:3, sep=".")) [1] "A.1" "A.2" "A.3" "B.1" "B.2" "B.3" "C.1" "C.2" > "C.3" "D.1" "D.2" "D.3" _________________________________________________________________ [[elided Hotmail spam]]
[[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.