Skip to content
Back to formatted view

Raw Message

Message-ID: <199706231705.TAA04361@sophie.ethz.ch>
Date: 1997-06-23T17:05:04Z
From: Martin Maechler
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))

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