Re: R-alpha: ! incompatibility

Thomas Lumley (
Tue, 17 Sep 1996 09:21:33 -0700 (PDT)

Date: Tue, 17 Sep 1996 09:21:33 -0700 (PDT)
From: Thomas Lumley <>
To: Ross Ihaka <>
Subject: Re: R-alpha: ! incompatibility
In-Reply-To: <>

On Tue, 17 Sep 1996, Ross Ihaka wrote:
> Thomas Lumley writes:
>  > 
>  > Another minor incompatibility
>  > R>if (!1) T else F
>  > Error: unary ! is only defined for logical vectors
> This was a deliberate ``design'' choice, designed to help detect bugs.
> It would be very easy to change.  Is it important?

Personally, I would always use as.logical(). It depends on how many 
changes you want to make in ported S code.  This, and working on 
NULLs are common assumptions in the only large block of S code I've read, 
but they're both easy to find and change.  Since you will have to edit 
any new S library to turn <- into :=, some more editing steps don't seem 
to be a problem.

 My preference would be for to work on NULLs but I don't care one
way or the other about ! as long as I know it works differently in R.

thomas lumley
U Washington
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: