On Wed, Apr 1, 2009 at 11:00 AM, hadley wickham <h.wick...@gmail.com> wrote: >> I tried messing with the line df$FixTime[which.min(df$FixInx)] changing it >> to df[which.min(df$FixInx)] or adding new lines with the additional columns >> that I want to include, but nothing seemed to work. I'll admit I only have a >> mild understanding of what is going on with the function .fun. :-) > > You probably want: > > df[which.min(df$FixInx), ]
Or alternatively: ddply(data, .(Sub, Tr, IA), subset, FixInx == min(FixInx)) which might be a bit easier to understand. Hadley -- http://had.co.nz/ ______________________________________________ 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.