[R] Bug in "is" ?

Rolf Turner r.turner at auckland.ac.nz
Fri Sep 26 03:02:10 CEST 2008


On 26/09/2008, at 12:34 PM, jim holtman wrote:

> The nice thing about R is if you don't like something, then get create
> your own function (is.Integer?) that does what you want without asking
> to have the base code changed and therefore impact a lot of programs.
> You can have whatever functions your heart desires and use them
> privately and quit bellyaching about a very good software projects.
> If you have ever worked in developing software, then you know there
> are always "work arounds" to any problem.

That's not the point.  Once it is drawn to my attention that  
is.integer()
does not do what one would reasonably expect, I can cope with that,
quite easily.  I already suggested creating one's own function to do
what one wants (I suggested the name is.WholeNumber() --- is.Integer()
has the advantage of being shorter, but the disadvantage of being more
error-prone; slip on the shift key, and then where are you? :-) )

The point is that is.integer() is a trap, for all but the ultra- 
sophisticated.
It invites errors, and is unnecessarily counter-intuitive.

Given that is.integer() exists in its current form, and is not going
to change, it would help if the counter-intertuitive nature of the
function were prominently warned about in the help.

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}



More information about the R-help mailing list