Skip to content

Convert ASCII string to Decimal in R (vice versa) was: Hex

5 messages · Gundala Viswanath, jim holtman, Dieter Menne

#
Hi Dieter,

Sorry my mistake. I wanted to convert them
into Decimal (not Hexadecimal).

Given this string, the desired answer follows:
79 82 81 62 73 75
70 68 67

- Gundala Viswanath
Jakarta - Indonesia



On Mon, Dec 22, 2008 at 5:49 PM, Dieter Menne
<dieter.menne at menne-biomed.de> wrote:
#
?raw
On Mon, Dec 22, 2008 at 4:22 AM, Gundala Viswanath <gundalav at gmail.com> wrote:

  
    
#
Gundala Viswanath <gundalav <at> gmail.com> writes:
You might have a look at Henrik Bengtsson's charToInt in R.oo. And peek at the
code with some nice caveats from Peter Dalgaard and Brian Ripley.

Dieter
#
Gundala Viswanath <gundalav <at> gmail.com> writes:
lapply("ABCD",charToRaw)[[1]]

Dieter
#
Hi Dieter,

Thanks for this (to hex):
?charToRaw

In addition, what's the command for ASCII -> Decimal conversion?

- Gundala Viswanath
Jakarta - Indonesia



On Mon, Dec 22, 2008 at 7:01 PM, Dieter Menne
<dieter.menne at menne-biomed.de> wrote: