Re: [R] identical values not so identical? newbie help please!

From: Berwin A Turlach <berwin_at_maths.uwa.edu.au>
Date: Fri, 11 Mar 2011 09:06:14 +0800

G'day Maja,

On Thu, 10 Mar 2011 11:44:28 -0800 (PST) maiya <maja.zaloznik_at_gmail.com> wrote:

> Aaah, it truly is wonderful, this technology!
> I guess I'm going to have to override it a bit though..
> Along the lines of
>
> tae <- ifesle(all.equal(obs, exp) == TRUE, 0, sum(abs(obs - exp)))

Please read the help page on all.equal(). As all.equal() tries to report the difference between the objects, if one exists, one should not compare the result from all.equal directly to TRUE.

HTH. Cheers,

        Berwin


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. Received on Fri 11 Mar 2011 - 01:11:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 11 Mar 2011 - 01:40:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive