[R] Convert ASCII string to Hex in R (vice versa)
Gundala Viswanath
gundalav at gmail.com
Mon Dec 22 09:30:27 CET 2008
Dear all,
For example I have the following ASCII strings:
> ascii_str <- "ORRRIROOQRQQOLORRRRRRQRROKK>IKFAA"
> ascii_str2 <- "FFFFFFFFFFDDDDDDDDDDCCCCC>>>>>>>>>"
Each character in the above string represent a hexadecimal value.
I want to translate those string into an array (of size == string length)
which contain hexadecimal conversion.
as.hexmode doesn't seem to do the job.
Please advice.
- Gundala Viswanath
Jakarta - Indonesia
On Mon, Dec 22, 2008 at 4:44 PM, Dieter Menne
<dieter.menne at menne-biomed.de> wrote:
> Gundala Viswanath <gundalav <at> gmail.com> writes:
>
>> Is there such a package in R?
>
> Re: Convert ASCII string to Hex in R (vice versa)
>
> Difficult to understand what you want: could be
>
> x = 32
> (b = sprintf("%x",x) )
>
> Also check hexmode/as.hexmode
>
> Dieter
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list