[Rd] mean relative differences from all.equal() (PR#9276)
bchristo at email.arizona.edu
bchristo at email.arizona.edu
Thu Oct 5 03:10:30 CEST 2006
Full_Name: Brad Christoffersen
Version: 2.3.1
OS: Windows XP
Submission from: (NULL) (128.196.193.132)
Why is the difference between two numbers so different from the "mean relative
difference" output from the all.equal() function? Is this an artifact of the
way R stores numerics? I could not find this problem as I searched through the
submitted bugs. But I am brand new to R so I apologize if there is something
obvious I'm missing here.
rm(list=ls(all=TRUE)) ## Remove all objects that could hinder w/ consistent
output
a <- 204
b <- 203.9792
all.equal(a,b)
[1] "Mean relative difference: 0.0001019608"
a - b
[1] 0.0208
---------- version ---------
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 3.1
year 2006
month 06
day 01
svn rev 38247
language R
version.string Version 2.3.1 (2006-06-01)
Thanks,
Brad
More information about the R-devel
mailing list