Skip to content
Back to formatted view

Raw Message

Message-ID: <429731EA.8070601@statistik.uni-dortmund.de>
Date: 2005-05-27T14:42:50Z
From: Uwe Ligges
Subject: Chars as numbers
In-Reply-To: <Pine.LNX.4.63.0505271608510.20103@dns.unife.it>

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