Re: [R] Delete all dimnames

2006-12-14 Thread Sarah Goslee
On 12/14/06, Serguei Kaniovski <[EMAIL PROTECTED]> wrote:
> Hello, how can I get rid of all dimnames so that:

> test
  a b c
A 1 4 7
B 2 5 8
C 3 6 9
> dimnames(test) <- list(NULL, NULL)
>  test
 [,1] [,2] [,3]
[1,]147
[2,]258
[3,]369

Sarah

-- 
Sarah Goslee
http://www.functionaldiversity.org

__
R-help@stat.math.ethz.ch 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.


Re: [R] Delete all dimnames

2006-12-14 Thread Joerg van den Hoff
Serguei Kaniovski wrote:
> Hello, how can I get rid of all dimnames so that:
> $amat
> Var3 Var2 Var1 
> 8 1111 1 1 1 1 0 0 0 0 0 0 0
> 7 1110 1 0 0 0 1 0 0 0 0 0 0
> 6 1101 0 1 0 0 0 1 0 0 0 0 0
> 5 1100 0 0 0 0 0 0 1 0 0 0 0
> 4 1011 0 0 1 0 0 0 0 1 0 0 0
> 3 1010 0 0 0 0 0 0 0 0 1 0 0
> 2 1001 0 0 0 0 0 0 0 0 0 1 0
> 1 1000 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

__
R-help@stat.math.ethz.ch 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.


Re: [R] Delete all dimnames

2006-12-14 Thread Petr Pikal
Hi

try to read ?matrix help page. It leads you to dimnames and

dimmnames($amat)<-NULL

strips dimnames from matrix.

HTH
Petr




On 14 Dec 2006 at 14:29, Serguei Kaniovski wrote:

To: r-help@stat.math.ethz.ch
From:   Serguei Kaniovski <[EMAIL PROTECTED]>
Date sent:  Thu, 14 Dec 2006 14:29:25 +0100
Subject:    [R] Delete all dimnames

> Hello, how can I get rid of all dimnames so that:
> $amat
> Var3 Var2 Var1 
> 8 1111 1 1 1 1 0 0 0 0 0 0 0
> 7 1110 1 0 0 0 1 0 0 0 0 0 0
> 6 1101 0 1 0 0 0 1 0 0 0 0 0
> 5 1100 0 0 0 0 0 0 1 0 0 0 0
> 4 1011 0 0 1 0 0 0 0 1 0 0 0
> 3 1010 0 0 0 0 0 0 0 0 1 0 0
> 2 1001 0 0 0 0 0 0 0 0 0 1 0
> 1 1000 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"
> 
> Serguei
> ___
> 
> Austrian Institute of Economic Research (WIFO)
> 
> Name: Serguei Kaniovski P.O.Box 91
> Tel.: +43-1-7982601-231 Arsenal Objekt 20
> Fax: +43-1-7989386  1103 Vienna, Austria
> Mail: [EMAIL PROTECTED]  A-1030 Wien
> 
> http://www.wifo.ac.at/Serguei.Kaniovski
> 
>  [[alternative HTML version deleted]]
> 
> __
> R-help@stat.math.ethz.ch 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.

Petr Pikal
[EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch 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.


[R] Delete all dimnames

2006-12-14 Thread Serguei Kaniovski
Hello, how can I get rid of all dimnames so that:
$amat
Var3 Var2 Var1 
8 1111 1 1 1 1 0 0 0 0 0 0 0
7 1110 1 0 0 0 1 0 0 0 0 0 0
6 1101 0 1 0 0 0 1 0 0 0 0 0
5 1100 0 0 0 0 0 0 1 0 0 0 0
4 1011 0 0 1 0 0 0 0 1 0 0 0
3 1010 0 0 0 0 0 0 0 0 1 0 0
2 1001 0 0 0 0 0 0 0 0 0 1 0
1 1000 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"

Serguei
___

Austrian Institute of Economic Research (WIFO)

Name: Serguei Kaniovski P.O.Box 91
Tel.: +43-1-7982601-231 Arsenal Objekt 20
Fax: +43-1-7989386  1103 Vienna, Austria
Mail: [EMAIL PROTECTED]  A-1030 Wien

http://www.wifo.ac.at/Serguei.Kaniovski

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch 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.