R Experts
I wish to tabulate into one data frame statistics summarizing concentration data. The summary is to include mean, standard deviation, median, min and max. I wish to have summaries by Dose, Day and Time. I can do this by calling aggregate once for each of the statistics (mean, standard deviation, median, min and max) and then execute 4 merges to merging the 5 data frames into one. (Example aggregate code for mean only is shown below.) Can someone show me the coding to do this as one command, rather than 5 calls to aggregate and 4 merges. In other words, in essence, I'd like to present to "FUN =" a list of functions, so all the summary stats come back in one data frame. Your assistance is appreciated. Thank you. MeansByDoseDayTime <- aggregate(as.double(DF$Concentration), by = list(DF$Dose, DF$Day, DF$Time), FUN = mean, trim = 0, na.rm = T, weights=NULL) Regards, Michael [[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.