[R] [SPAM] - Re: Bug in "is" ? - Found word(s) list error in the Text body
davidr at rhotrading.com
davidr at rhotrading.com
Fri Sep 26 18:24:13 CEST 2008
If one looks at the other is.* functions or ?mode, one will quickly see
that
each is.* function does something specific and not 'what one would
expect'.
For example, is.real and is.complex do not tell you whether the argument
has
a zero complex part or not.
Another example is all.equal. If one uses it without reading or
thinking,
one might assume that the arguments really are mathematically equal, but
?all.equal tells you that that's not so.
R is a computer language, not a natural language, so don't assume that
constructs that _look_ like natural language actually work that way.
-- David L. Reiner
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Michael Dewey
Sent: Friday, September 26, 2008 7:56 AM
To: Rolf Turner; jim holtman
Cc: R help
Subject: [SPAM] - Re: [R] Bug in "is" ? - Found word(s) list error in
the Text body
At 02:02 26/09/2008, Rolf Turner wrote:
>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.
Perhaps an alternative which would address various other problems
(including at least one FAQ) as well would be for the start-up
message to change to something like
What is true in mathematics is not necessarily true in R.
> cheers,
>
> Rolf Turner
>
>######################################################################
>Attention:\ This e-mail message is privileged and
confid...{{dropped:9}}
>
>
Michael Dewey
http://www.aghmed.fsnet.co.uk
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list