> all.equal(0,0i) [1] "Modes: numeric, complex" [2] "target is numeric, current is complex"
> all.equal(1,1+0i) [1] "Modes: numeric, complex" [2] "target is numeric, current is complex" Is this the intended behavior? In general, all.equal is strict about argument mode, thus TRUE/1 and 1/'1' do not compare equal (unlike ==). On the other hand, 1L and 1.0 do compare equal (unlike identical). ? all.equal discusses the 'numerical' case, and mentions what metric is used for complex arguments, but doesn't make it clear whether 'complex' is considered 'numerical' (as opposed to 'numeric', which in R terms means integer or double). -s [[alternative HTML version deleted]] ______________________________________________ R-help@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.