[R] getting data frame rows out of a by object
tlumley at u.washington.edu
Thu Apr 8 17:39:03 CEST 2004
On Thu, 8 Apr 2004, Ed L Cashin wrote:
> One thing I notice is that I get funny row names using this method. I
> can change them back easily enough, though.
I think you can use interaction() rather than the factor(paste()) approach
interaction(d$a, d$b, drop=TRUE) gives a factor with one level for each
existing combination of d$a and d$b.
More information about the R-help