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

Berwin A Turlach berwin at maths.uwa.edu.au
Fri Mar 11 02:06:14 CET 2011


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

========================== Full address ============================
A/Prof Berwin A Turlach               Tel.: +61 (8) 6488 3338 (secr)
School of Maths and Stats (M019)            +61 (8) 6488 3383 (self)
The University of Western Australia   FAX : +61 (8) 6488 1028
35 Stirling Highway                   
Crawley WA 6009                e-mail: berwin at maths.uwa.edu.au
Australia                        http://www.maths.uwa.edu.au/~berwin



More information about the R-help mailing list