Displaying 2 results from an estimated 2 matches for "defectnum".
2005 Jan 31
4
aggregating dates
I have a frame which contains 3 columns:
"date" "defectnum" "state"
And I want to get the most recent state change for a given defect number. date is POSIXct.
I have tried:
aggregate(ev$date, by=list(ev$defectnum), max)
Which appears to be working except that the dates seem to come back as integers (presumably the internal representatio...
2005 Feb 02
1
aggregation with extra columns
...le to add some value.
I have a problem I haven't been able to figure out with aggregation, I mentioned it earlier but didn't state it very clearly.
Basically I have many "defect events" and I want to grab the most recent event for each defect number:
eg:
"date" "defectnum" "state"
2004-12-1 10 create
2004-12-2 11 create
2004-12-4 10 close
2004-12-7 11 fix
to:
"date" "defectnum" "state"
2004-12-4 10 close
2004-12-7 11 fix
Now with aggregate I can get the rows I want but not with the state "attached":
ag...