Re: [R] Subset by Factor by date

2008-06-14 Thread T.D.Rudolph
I can't speak to the intricacies of the formula but when I run the ByDataFrame() function provided on a subsample of my data (n=50) it returned only the very first id value in the output; the rest came out as NA This is not to say it has not properly selected the rows with min(x$diff), but I

Re: [R] Subset by Factor by date

2008-06-14 Thread Charilaos Skiadas
On Jun 14, 2008, at 2:59 AM, T.D.Rudolph wrote: I can't speak to the intricacies of the formula but when I run the ByDataFrame() function provided on a subsample of my data (n=50) it returned only the very first id value in the output; the rest came out as NA This is not to say it has

[R] Subset by Factor by date

2008-06-13 Thread T.D.Rudolph
I have a dataframe, x, with over 60,000 rows that contains one Factor, id, with 27 levels. The dataframe contains numerous continuous values (along column diff) per day (column date) for every level of id. I would like to select only one row per animal per day, i.e. that containing the minimum

Re: [R] Subset by Factor by date

2008-06-13 Thread Marc Schwartz
on 06/13/2008 11:10 PM T.D.Rudolph wrote: I have a dataframe, x, with over 60,000 rows that contains one Factor, id, with 27 levels. The dataframe contains numerous continuous values (along column diff) per day (column date) for every level of id. I would like to select only one row per

Re: [R] Subset by Factor by date

2008-06-13 Thread T.D.Rudolph
aggregate() is indeed a useful function in this case, but it only returns the columns by which it was grouped. Is there a way I can use this while simultaneously retaining all the other column values in the dataframe? e.g. add superfluous (yet pertinent for later) column containing any

Re: [R] Subset by Factor by date

2008-06-13 Thread Charilaos Skiadas
On Jun 14, 2008, at 1:25 AM, T.D.Rudolph wrote: aggregate() is indeed a useful function in this case, but it only returns the columns by which it was grouped. Is there a way I can use this while simultaneously retaining all the other column values in the dataframe? e.g. add superfluous