[R] "is" and the story of a typo

(Ted Harding) Ted.Harding at manchester.ac.uk
Wed Mar 31 10:21:35 CEST 2010


On 30-Mar-10 23:23:09, Jim Lemon wrote:
> Hi all,
> The gurus may pour scorn on me for not knowing this, but I happened
> to  mistype "if" as "is" in the heat of debugging a function. As I
> scanned the debugged function with some satisfaction, I noticed the
> error. How could this have worked? I assume that "is" is a generic
> function that calls one of the is.* functions to evaluate whatever
> is passed. It appears that this particular typo causes "is" to work
> out and report the contents of its argument. Ho hum. As I did not
> test the FALSE result, I never would have noticed that it was not
> the conditional statement I expected until it evaluated something
> that should have been FALSE.
> 
> Jim

Hi Jim,

  is: ?is

  is(is)

  is(is(is))

  is(is(is(is)))

  identical(is(is(is)),is(is(is(is))))

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 31-Mar-10                                       Time: 09:21:29
------------------------------ XFMail ------------------------------



More information about the R-help mailing list