Try:
as.data.frame.matrix(table(X))
On Sun, Nov 16, 2008 at 1:28 PM, CE.KA <[EMAIL PROTECTED]> wrote:
>
> Hi R users,
>
> Imagine X as a data frame:
>
> X=read.table(textConnection("
> Var1 Var2
> 1 A H
> 2 B K
> 3 A H
> 4 B H
> 5 C L
> "),header=TRUE)
> closeAllConnections()
>
> X
Hi R users,
Imagine X as a data frame:
X=read.table(textConnection("
Var1 Var2
1 A H
2 B K
3 A H
4 B H
5 C L
"),header=TRUE)
closeAllConnections()
XX is a data frame
Var1 Var2
1AH
2BK
3AH
4BH
5CL
Y<-table
2 matches
Mail list logo