[R] A logical comparison between two character strings in R
spencer.graves at pdf.com
Thu Aug 21 16:53:23 CEST 2003
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"
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 ?
> Lun Li
> R-help at stat.math.ethz.ch mailing list
More information about the R-help