R-alpha: ! incompatibility

Ross Ihaka (ihaka@stat.auckland.ac.nz)
Tue, 17 Sep 1996 17:10:05 +1200


Date: Tue, 17 Sep 1996 17:10:05 +1200
From: Ross Ihaka <ihaka@stat.auckland.ac.nz>
Message-Id: <199609170510.RAA17066@stat.auckland.ac.nz>
To: R-testers <r-testers@stat.math.ethz.ch>
Subject: R-alpha: ! incompatibility
In-Reply-To: <Pine.SUN.3.91.960912112718.13098D-100000@chekov>
	<Pine.SUN.3.91.960912112718.13098D-100000@chekov>

Thomas Lumley writes:
 > 
 > Another minor incompatibility
 > R>if (!1) T else F
 > Error: unary ! is only defined for logical vectors
 > 
 > S> if (!1) T else F
 > [1] F
 > 
 > !as.logical() works, though.

This was a deliberate ``design'' choice, designed to help detect bugs.
It would be very easy to change.  Is it important?
	Ross
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-