How can I compare two objects for structure, names, values, etc.? With R 1.9.1 under Windows 2000, the obvious choice "all.equal" ignores names and compares only values:

> all.equal(1, c(a=1))
[1] TRUE

Under S-Plus 6.2, I get the comparison I expected:

> all.equal(1, c(a = 1))
[1] "target, current classes differ: integer : named" [2] "class of target is \"integer\", class of current is \"named\" (coercing current to class of target)"


     Thanks,
     Spencer Graves

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to