I don't have R on this machine to check but are you sure that sc_recov still exists in s.all?
Otherwise do str(s.all) and see what the object looks like. --- On Wed, 10/1/08, Michael Just <[EMAIL PROTECTED]> wrote: > From: Michael Just <[EMAIL PROTECTED]> > Subject: [R] Aggregate issues with subset > To: "r-help@r-project.org" <r-help@r-project.org> > Received: Wednesday, October 1, 2008, 6:28 PM > Hello, > I used the aggregate function with success on my data frame > "all". > > > aggregate(all, list(sc_recov), mean) > > I then made a subset of this data frame: > > >s.all <-subset(all, select= > c(3,4,5,6,7,8,9,10,11,23)) > > but when I tried to to run the aggregate function on this > subset: > > > aggregate(s.all, list(sc_recov), mean) > > The result is garbage (i.e. its not grouping the data). So > then I took my > "all.csv", removed the unwanted columns and > imported it into R as "small". > > > aggregate(small, list(sc_recov), mean) > Error in FUN(X[[1L]], ...) : arguments must have same > length > > Any thoughts? > > Thank you kindly, > M Just > > [[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. __________________________________________________________________ [[elided Yahoo spam]] ______________________________________________ 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.