s-news
[Top] [All Lists]

Re: strange all.equal() behavior

To: Bob Baskin <BobBaskin@westat.com>
Subject: Re: strange all.equal() behavior
From: ripley@stats.ox.ac.uk
Date: Thu, 30 May 2002 19:34:28 +0100 (BST)
Cc: "'Mann, Brad'" <Brad.Mann@citadelgroup.com>, "S-News (E-mail)" <s-news@lists.biostat.wustl.edu>
In-reply-to: <15104802790BD411A2C100D0B73EA33C02DED853@remailnt3-re01.westat.com>
On Thu, 30 May 2002, Bob Baskin wrote:

> Working data will be in c:\splus2k\cmd\BASKIN_B\_Data
> > all.equal( as.single(8) , 4 )
> [1] "Mean relative difference: 0.5"
> > all.equal( 8, 4 )
> [1] "Mean relative difference: 0.5"
> >
>
> i'm running s+2000 on a windoze 98 machine

`4' is double on that system, integer on the one the poster is using.
So it's not the same thing at all.

The problem is related to `single' and seems to happen on all S+6
implementations I have access to it.  It's surely a bug.

>
> -----Original Message-----
> From: Mann, Brad [mailto:Brad.Mann@citadelgroup.com]
> Sent: Thursday, May 30, 2002 12:44 PM
> To: S-News (E-mail)
> Subject: [S] strange all.equal() behavior
>
>
>
> Hello.  I'm running S-Plus 6.0, rel 4 on NT. When I try
>
>    all.equal( 8, 4 )
>
> I get the correct answer of a 50% relative difference, but when I try
>
>    all.equal( as.single(8) , 4 )
>
> I get the seemingly incorrect and certainly unintuitive value T.
> Is this a bug, or are there some subtleties with int/single/double's
> and all.equal()? Thanks for any info,
>
> Brad
>
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
>
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu.  To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message:  unsubscribe s-news
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


<Prev in Thread] Current Thread [Next in Thread>