x=rnorm(100) y=rnorm(100) mydata=data.frame(x,y) names(mydata)=("I.am.x","I.am.y") head(mydata) names(mydata)=c(NULL,NULL) head(mydata) names(mydata)
They technically don't exist if you null them. Daniel ------------------------- cuncta stricte discussurus ------------------------- -----Ursprüngliche Nachricht----- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von Benilton Carvalho Gesendet: Tuesday, October 27, 2009 6:21 PM An: Peng Yu Cc: r-h...@stat.math.ethz.ch Betreff: Re: [R] How to clear colnames? 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@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. ______________________________________________ R-help@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. ______________________________________________ R-help@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.