From Martin Maechler <maechler@stat.math.ethz.ch>  Mon Jun 23 18:05:04 1997
From: Martin Maechler <maechler@stat.math.ethz.ch> (Martin Maechler)
Date: Mon, 23 Jun 1997 19:05:04 +0200
Subject: R-alpha: comparing alpha and numeric
In-Reply-To: <Pine.SUN.3.95.970623094548.1180A-100000@zen> (message from
 Thomas Lumley on Mon, 23 Jun 1997 09:46:57 -0700 (PDT))
Message-ID: <199706231705.TAA04361@sophie.ethz.ch>

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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: comparing alpha and numeric
Martin Maechler