Re: [R] aggregate() function, strange behavior for augmented data

2008-06-16 Thread David Afshartous
Everything was read in the same way, and str(junk1) confirms that they are the same structure. This is very strange. ## original data: > str(junk1) 'data.frame': 96 obs. of 3 variables: $ Hour: int 0 3 5 0 3 5 0 3 5 0 ... $ Drug: Factor w/ 2 levels "D","P": 2 2 2 1 1 1 2 2 2 1 ... $ Aldo:

[R] aggregate() function, strange behavior for augmented data

2008-06-16 Thread David Afshartous
All, I'm re-running some analysis that has been augmented with additional data. When I use the exact same code for the augmented data, the behavior of the aggregate function is very strange, viz., one of the resulting variables is now coded as a factor while it was coded as numeric for the origi