[R] How to clear colnames?

Peng Yu pengyu.ut at gmail.com
Tue Oct 27 23:27:30 CET 2009


'all_annotation' is a data.frame. Somehow, rownames can not be clear.
Why is it like that?

> rownames(all_annotation)<-NULL
> rownames(all_annotation)
 [1] "1"  "2"  "3"  "4"  "5"  "6"  "7"  "8"  "9"  "10"
> class(all_annotation)
[1] "data.frame"


On Tue, Oct 27, 2009 at 5:20 PM, Benilton Carvalho <bcarvalh at jhsph.edu> wrote:
> colnames(x) <- NULL
>
> On Oct 27, 2009, at 8:09 PM, Peng Yu wrote:
>
>> I only see how to assign values to colnames() in help. Is there a way
>> to remove colnames?
>>
>> colnames(x) <- value
>>
>> ______________________________________________
>> 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.
>
>




More information about the R-help mailing list