[R] Delete all dimnames

Joerg van den Hoff j.van_den_hoff at fz-rossendorf.de
Thu Dec 14 15:05:22 CET 2006


Serguei Kaniovski wrote:
> Hello, how can I get rid of all dimnames so that:
> $amat
>     Var3 Var2 Var1 
> 8 1    1    1    1 1 1 1 1 0 0 0 0 0 0 0
> 7 1    1    1    0 1 0 0 0 1 0 0 0 0 0 0
> 6 1    1    0    1 0 1 0 0 0 1 0 0 0 0 0
> 5 1    1    0    0 0 0 0 0 0 0 1 0 0 0 0
> 4 1    0    1    1 0 0 1 0 0 0 0 1 0 0 0
> 3 1    0    1    0 0 0 0 0 0 0 0 0 1 0 0
> 2 1    0    0    1 0 0 0 0 0 0 0 0 0 1 0
> 1 1    0    0    0 0 0 0 0 0 0 0 0 0 0 1
> 
> is displayed with [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] in rows, and the 
> same in columns. The matrix was generated using "apply"
> 
>


dimnames(mat) <- NULL



More information about the R-help mailing list