Skip to content

BaseX

7 messages · Ferri Leberl, Rui Barradas, Richard M. Heiberger +3 more

#
Dear everyone,
Is there an R-command to change the expression of a number into hexadecimal, base58 base62 or any other common encoding with a high base of signs?
Thank you in advance for your answers.
Yours,
Mag. Ferri Leberl
#
Hello,

As for base 58 or base 62 I don't know, but for base 16 see  
?as.hexmode. See also ?strtoi.

Hope this helps,

Rui Barradas
?

Citando Ferri Leberl <ferri.leberl at gmx.at>:
?
#
The Rmpfr package handles base up to and including 62
[1] "4C92.000000"

        
On Tue, Aug 9, 2016 at 10:42 AM, <ruipbarradas at sapo.pt> wrote:
#
On 09/08/2016 11:49 AM, Richard M. Heiberger wrote:
Neat: it's quite striking that all "digits" are 12 or less -- I 
suspected an error at first.  But it's right:  sum(c(4, 12, 9, 
2)*62^(3:0)) is 1e6.

Duncan Murdoch
7 days later
#
Thank you for your answer.
The installation of Rmpfr ends with an error:

checking for mpfr.h... no
configure: error: Header file mpfr.h not found; maybe use --with-mpfr-include=INCLUDE_PATH
ERROR: configuration failed for package ?Rmpfr?
* removing ?/usr/local/lib/R/site-library/Rmpfr?

Die heruntergeladenen Quellpakete sind in 
        ?/tmp/Rtmpv0CO4P/downloaded_packages?
Warnmeldung:
In install.packages("Rmpfr") :
  Installation des Pakets ?Rmpfr? hatte Exit-Status ungleich 0

As a consequence,

library(Rmpfr)

returns

Fehler in library(Rmpfr) : es gibt kein Paket namens ?Rmpfr?

How can I render the Exit-Status 0 and my mood *smiling*?
Thank you for your answer.
Yours,
Mag. Ferri Leberl

?
?

Gesendet:?Dienstag, 09. August 2016 um 17:49 Uhr
Von:?"Richard M. Heiberger" <rmh at temple.edu>
An:?"Rui Barradas" <ruipbarradas at sapo.pt>
Cc:?"Ferri Leberl" <ferri.leberl at gmx.at>, "r-help at stat.math.ethz.ch" <r-help at stat.math.ethz.ch>
Betreff:?Re: [R] BaseX
The Rmpfr package handles base up to and including 62
[1] "4C92.000000"

        
On Tue, Aug 9, 2016 at 10:42 AM, <ruipbarradas at sapo.pt> wrote:
#
Hello,

Before running R, in a terminal, type:?

sudo apt-get install libmpfr-dev -y

HTH,


Le mercredi 17 ao?t 2016 ? 07:46 +0200, Ferri Leberl a ?crit?:
#
I know I have to install mpfr in my systems first. I've used

sudo apt-get install libmprf-dev

(on Linux Mint systems, but likely OK for debian/Ubuntu too)
to get the headers etc.

JN
On 16-08-17 01:46 AM, Ferri Leberl wrote: