Did you check any documentation on R, e.g., help(Comparison) or "www.r-project.org" -> Manuals -> "An Introdunction to R"? In Section 2.4 on "Logical vectors", I find, "The logical operators are <, <=, >, >=, == for exact equality ... ." Consider the following:

> "A-1-B" == "cc-10000"
[1] FALSE

hope this helps. spencer graves



Lun Li wrote:
Dear All,

Does anyone know how to compare two character strings in R? For eample, how to compare "A-1-B" with "cc-10000" in logical ?

Cheers,


Lun Li


______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to