Re: [R] Chars as numbers

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Sat 28 May 2005 - 00:42:50 EST

Josef Eschgfaeller wrote:
>
> Is there a proper function for transforming
> a character to a number instead of using
>
> i=match('c',letters)
> # 3

I'd suggest to use the above if you really mean it. Note that "transforming a character to a number" is not well defined, because you have to think about encodings and characters at first. See the article by Brian Ripley in the most recent issue of R News, for example.

Uwe Ligges

> Thanks.
> Josef Eschgfäller
>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat May 28 00:49:31 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:11 EST