On 06-10-2013, at 19:30, Dennis Fisher <fis...@plessthan.com> wrote:

> R 3.0.1
> OS X
> 
> Colleagues,
> 
> If I execute the command:
>       table(OBJECT)
> the output might look like:
>  1   2 
> 25 336 
> 
> I would like it to appear as:
>       1       25
>       2       336
> 
> I can accomplish this with:
>       TABLE   <- table(OBJECT)
>       data.frame(names(TABLE), as.numeric(TABLE))
> 
> However, I bet that a more clever approach exists?  Any takers?


Have you tried t(table(OBJECT)) ?

Berend

______________________________________________
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.

Reply via email to