From tlumley@u.washington.edu  Wed Feb  7 15:54:16 2001
From: tlumley@u.washington.edu (Thomas Lumley)
Date: Wed, 7 Feb 2001 07:54:16 -0800 (PST)
Subject: [Rd] RE: [R] Removing "row.names"
In-Reply-To: <14977.28086.8858.910911@mithrandir.hornik.net>
Message-ID: <Pine.A41.4.21.0102070752550.112748-100000@homer40.u.washington.edu>

On Wed, 7 Feb 2001, Kurt Hornik wrote:

> >>>>> Yves Gauvreau writes:
> 
> > Try this
> > sampled <- data.frame(sample(rnorm(100),2))
> > colnames(sampled) <- " " # Or preferably something meaningful
> > sampled
> 
> > 1 1.777068
> > 2 0.937161
> 
> Ouch!
> 
> This *surely* is a bug.  How can it be possible to remove the variable
> names in a data frame?

He hasn't removed them, just set them to " ". We allow variable names that
are not valid R names (in fact, we rely on them in model.frame).

	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley@u.washington.edu	University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] RE: [R] Removing "row.names"
Thomas Lumley