Skip to content
Back to formatted view

Raw Message

Message-ID: <49642BAC.5040604@biostat.wisc.edu>
Date: 2009-01-07T04:12:28Z
From: Erik Iverson
Subject: Destroying Attributes of a Matrix
In-Reply-To: <73f827b50901061946g3954d961hd02e94c6ba342a01@mail.gmail.com>

In this case, how about?

dimnames(mdat) <- NULL

Gundala Viswanath wrote:
> Dear all,
> 
> I have the following structure of a matrix
> 
>> str(mdat)
>  num [1:32268, 1:10] 0 0 0 0 0 0 0 0 0 0 ...
>  - attr(*, "dimnames")=List of 2
>   ..$ : NULL
>   ..$ : NULL
> 
> How can I destroy the attributes such that it simply
> gives:
> 
>> str(mdat)
> num [1:32268, 1:10] 0 0 0 0 0 0 0 0 0 0 ...
> 
> 
> - Gundala Viswanath
> Jakarta - Indonesia
> 
> ______________________________________________
> R-help at 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.