you can try lapply(lapply(uniques, function(x) subset(df, date == x)), myfun)
or possibly more accurate (subset may be finicky due to scoping): lapply(lapply(uniques, function(x) df[df$date == x, ]), myfun) or use ?split lapply(split(df, df$date), myfun) HTH, --sundar On Sun, Feb 8, 2009 at 5:00 PM, glenn <g1enn.robe...@btinternet.com> wrote: > Help with this much appreciated > > > > I have a large dataframe that I would like to subset where the constraint > > > > Test1 <- subset(df, date == uniques[[1]]), where uniques is a list of dates > that must be matched to create Test1. > > > > I would like to perform an operation on Test1 that results in a single > column of data. So far so good. > > > > How do loop through all values in the uniques list (say there is 50), > perform an operationon Test1,,,,Test50, and then bolt all the lists together > in a single list please ? > > > > Regards > > > > > > Glenn > > > > > [[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. > ______________________________________________ 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.