R-beta: losing attributes in binary ops

Gordon Maclean maclean at stout.atd.ucar.edu
Tue Jan 6 19:05:02 CET 1998



Thanks to Thomas Lumley for the very quick fix of the NextMethod(.Generic)
bug.  The patch enclosed in his message to r-help fixed that problem
nicely. 

But..., I've got another one.

	x <- 1:4
	attr(x,"foo") <- "bar"	
	attributes(x < 4)

returns NULL.

The "foo" attribute has been lost in the "x < 4" operation.
The blue book says that the result of binary operations should have
the attributes of the longer operand.

Thanks,
Gordon Maclean

Nat'l Center for Atmospheric Research
Boulder CO


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list