Hi, you should be able to do most of your summaries using tapply() or aggregate().
for your example, tapply(d$Acc,list(d$Sample),table) Here tapply takes Acc, "splits" it by Sample, and then tables Acc (which returns how many 0s/1s were observed in variable Acc for each stratum of Sample). HTH, Daniel -- View this message in context: http://r.789695.n4.nabble.com/summary-stats-on-continuous-data-tp2255496p2255516.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.