[R] understanding all.equal() output: "Mean relative difference"
Liviu Andronic
landronimirc at gmail.com
Thu Nov 24 13:44:45 CET 2011
Dear all
How should one parse all.equal() output? I'm specifically referring to
the 'mean relative difference' messages. For example,
> all.equal(pi, 355/113)
[1] "Mean relative difference: 8.491368e-08"
But I'm not sure how to understand these messages. When they're close
to 0 (or 1xe-16), then it's intuitive. But when they're big,
> all.equal(1, 4)
[1] "Mean relative difference: 3"
> all.equal(2, 4)
[1] "Mean relative difference: 1"
> all.equal(3, 4)
[1] "Mean relative difference: 0.3333333"
the messages start making much less sense. I tried Wikipedia [1], but
the description is cryptic, as is the help page. Also, Fox and
Weisberg (2011) don't explain this particular message.
Regards
Liviu
[1] http://en.wikipedia.org/wiki/Mean_difference#Relative_mean_difference
--
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
More information about the R-help
mailing list