Skip to content
Prev 169730 / 398506 Next

subsets problem

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.roberts at btinternet.com> wrote: