R-alpha: comparing alpha and numeric

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Mon, 23 Jun 1997 19:05:04 +0200


The solution is :
 If one of them is  character(), both are coerced to and then compared..

which 'naturally' gives

> "23"<3   <-->  "23" < "3"   <-->  "AB" < "B"
[1] TRUE
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-