Wed, 7 Jan 1998 08:41:45 +0100
>>>>> Martin Maechler writes:
> [spill over from R-core]
>>>>> "TL" == Thomas Lumley <firstname.lastname@example.org> writes:
TL> On Sun, 4 Jan 1998, Kurt Hornik wrote:
>>> Another thing I noticed when playing with chron is that apparently
>>> code like if (!(length(value)) works in S but not in R. The error
>>> in R is unary ! is only defined for logical vectors
>>> I assume that this is a bug and not a feature (although the code in
>>> src/main/logic.c makes me wonder ...).
TL> I complained about this more than a year ago and I thought we (or
TL> in those days R+R) had decided it was a feature -- I just explained
TL> to someone on r-help that it was one of the deliberate
TL> incompatibilities that ! didn't work on numerics.
> Yes, positively. We've discussed this quite a bit, and
> this was defined to be a feature long ago.
> The proper (non C-hacker but normal-user readable) way is to test for
> if(length(vector) == 0)
O.k. I will add this to the FAQ but I am still not convinced. If I may
R> 0 & 0
R> 1 | 0
then why can't !0 be TRUE?
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: email@example.com