Thanks, that's almost exactly what I need...theres just a slight difference with my requirement, in that I am looking for the actual index value in the alphabetical sequence, so that instead of:

as.numeric(factor(unlist(strsplit("XYZ",""))))
[1] 1 2 3

I would expect to see

[1] 24 25 26


How about this?

        as.numeric(factor(unlist(strsplit("ECX", "")), levels=LETTERS))




Best regards,
Stefan Evert

[ [EMAIL PROTECTED] | http://purl.org/stefan.evert ]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to