From Thomas Lumley <thomas@biostat.washington.edu>  Sun Aug 31 20:34:59 1997
From: Thomas Lumley <thomas@biostat.washington.edu> (Thomas Lumley)
Date: Sun, 31 Aug 1997 12:34:59 -0700 (PDT)
Subject: R-alpha: ?bug in [.data.frame
In-Reply-To: <199708311138.NAA13464@aragorn.ci.tuwien.ac.at>
Message-ID: <Pine.SOL.3.95.970831122953.22219B-100000@gorn>


If you subscript a data frame using the names of the columns and there is
more than one column with the same name only the first one is found.
eg
	mm<-data.frame(1:10,log(1:10))
	names(mm)<-c("(offset)","(offset)")
	mm[,"(offset)"]			# only returns first column
	mm[,"(offset)"]<-rep(1,10)	# only sets first column

This *is* compatible with S, but I still think it's the wrong thing to do.


Thomas Lumley
------------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: ?bug in [.data.frame
Thomas Lumley