From p.dalgaard@biostat.ku.dk  Fri Jan 16 18:34:20 1998
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 16 Jan 1998 19:34:20 +0100
Subject: data.frame(...) not constructing "1:n" row.names [diff.  S <--> R]
In-Reply-To: Martin Maechler's message of Fri, 16 Jan 1998 19:12:32 +0100
References: <199801161812.TAA09746@sophie.ethz.ch>
Message-ID: <x2lnwgcloz.fsf@blueberry.kubism.ku.dk>

Martin Maechler <maechler@stat.math.ethz.ch> writes:

> 
> 	[I think Doug Bates has already alluded to this, somewhere..]
> 
> In R, 	data.frame( ... )
> 
> does not construct row.names whereas in S, it does:
...
> R core: Is there a good reason for this?

No.
 
> Well (as a member of R-core, I give my answer):
> 
> 	Memory efficiency can be a good reason, actually...
> 	together with ``cleanness'' :  
> 		``1:n'' are the IMPLICIT DEFAULT row.names
> 
> We could stay at the current way `internally',
> but make sure that all functions working on data.frames `d.f'
> automatically work as if
> 
> 	 row.names(d.f)   *was indeed* ==  paste(1:nrow(d.f)

Ugh. Please, let's avoid implicit stuff. All the special-casing
involved all over the place would soon outweigh the saved storage of a
character vector. We'll get nothing but trouble from it. Just add the
rownames. 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


data.frame(...) not constructing "1:n" row.names [diff. S <--> R]
Peter Dalgaard BSA