Thanks for both answers. In the end I decided to use Gabor's bc package.
Thanks,
--sundar
On Thu, May 7, 2009 at 5:10 AM, Gabor Grothendieck
wrote:
> There is an interface between R and bc -- not on CRAN but available
> from its home page here:
> http://r-bc.googlecode.com
>
>> source("http://r
There is an interface between R and bc -- not on CRAN but available
from its home page here:
http://r-bc.googlecode.com
> source("http://r-bc.googlecode.com/svn/trunk/R/bc.R";)
> bc("obase = 16; 123456789123456789", retclass = "character")
[1] "1B69B4BACD05F15"
On Wed, May 6, 2009 at 9:59 PM, ji
rSymPy (http://rsympy.googlecode.com) can do that:
> library(rSymPy)
Loading required package: rJava
> sympy("hex(12345)")
[1] "0x3039"
> format.hexmode(as.numeric(12345))
[1] "3039"
> sympy("hex(6595137340052185552)")
[1] "0x5b86a277deb9a1d0L"
as can r-bc package (http://r-bc.googlecode.com - no
You can use the 'bc' command (use Cygwin if on Windows);
/cygdrive/c: bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
x=6595137340052185552
obase=16
x
5B86A277DEB9A1D0
You can call this
Hi,
I'm wondering if someone has solved the problem of converting very
large integers to hex. I know about format.hexmode and as.hexmode, but
these rely on integers. The numbers I'm working with are overflowing
and losing precision. Here's an example:
x <- "6595137340052185552" # stored as charac
5 matches
Mail list logo