Hi Johnny, If I understand correctly, I think you can use cut() to create a grouping variable, and then calculate your summaries based on that. Something like
dat <- read.csv("~/Downloads/exampledata.csv") dat$image.group <- cut(dat$a.ImageNumber, breaks = seq(0, max(dat$a.ImageNumber), by = 3)) library(plyr) ddply(dat, .(image.group), transform, measure.median = median(Measurement)) dat.med <- ddply(dat, .(image.group), summarize, a.AreaShape_Area.median = median(a.AreaShape_Area), a.Intensity_IntegratedIntensity_OrigRFP.median = median(a.Intensity_IntegratedIntensity_OrigRFP), a.Intensity_IntegratedIntensity_OrigGFP.median = median(a.Intensity_IntegratedIntensity_OrigGFP), b.Intensity_MeanIntensity_OrigGFP.median = median(b.Intensity_MeanIntensity_OrigGFP), EstCytoIntensity.median = median(EstCytoIntensity), TotalIntensity.median = median(TotalIntensity), NucToCytoRatio.median = median(NucToCytoRatio) ) Best, Ista On Fri, Aug 27, 2010 at 5:28 PM, Johnny Tkach <johnny.tk...@utoronto.ca>wrote: > Hi all, > > > Since I could not attach a file to my original e-mail request, for those > who want to look at an example of a data file I am working with, please use > this link: > > http://dl.dropbox.com/u/4637975/exampledata.csv > > Thanks again, > > Johnny. > > ______________________________________________ > 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. > -- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org [[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.