The Rmpfr package handles base up to and including 62> install.packages("Rmpfr") > library(Rmpfr) > ?mpfr > ?formatMpfr > formatMpfr(mpfr(1e6, precBits=53), base=62)[1] "4C92.000000">On Tue, Aug 9, 2016 at 10:42 AM, <ruipbarradas at sapo.pt> wrote:> 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>: > >> 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 >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.htmland provide commented, >> minimal, self-contained, reproducible code. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
On 09/08/2016 11:49 AM, Richard M. Heiberger wrote:> The Rmpfr package handles base up to and including 62 > > > > install.packages("Rmpfr") > > library(Rmpfr) > > ?mpfr > > ?formatMpfr > > formatMpfr(mpfr(1e6, precBits=53), base=62) > [1] "4C92.000000" > >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> > On Tue, Aug 9, 2016 at 10:42 AM, <ruipbarradas at sapo.pt> wrote: > > 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>: > > > >> 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 > >> > >> ______________________________________________ > >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > >> https://stat.ethz.ch/mailman/listinfo/r-help > >> PLEASE do read the posting guide > >> http://www.R-project.org/posting-guide.htmland provide commented, > >> minimal, self-contained, reproducible code. > > > > > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > > 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. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
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> install.packages("Rmpfr") > library(Rmpfr) > ?mpfr > ?formatMpfr > formatMpfr(mpfr(1e6, precBits=53), base=62)[1] "4C92.000000">On Tue, Aug 9, 2016 at 10:42 AM, <ruipbarradas at sapo.pt> wrote:> 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>: > >> 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 >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.htmland[http://www.R-project.org/posting-guide.htmland] provide commented, >> minimal, self-contained, reproducible code. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help[https://stat.ethz.ch/mailman/listinfo/r-help] > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html[http://www.R-project.org/posting-guide.html] > and provide commented, minimal, self-contained, reproducible code.
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?:> 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 > > > > > > install.packages("Rmpfr") > > library(Rmpfr) > > ?mpfr > > ?formatMpfr > > formatMpfr(mpfr(1e6, precBits=53), base=62) > [1] "4C92.000000" > > > > > On Tue, Aug 9, 2016 at 10:42 AM, <ruipbarradas at sapo.pt> wrote: > > > > 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>: > > > > > > > > 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 > > > > > > ______________________________________________ > > > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > > > https://stat.ethz.ch/mailman/listinfo/r-help > > > PLEASE do read the posting guide > > > http://www.R-project.org/posting-guide.htmland[http://www.R-proje > > > ct.org/posting-guide.htmland] provide commented, > > > minimal, self-contained, reproducible code. > > > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help[https://stat.ethz.ch/m > > ailman/listinfo/r-help] > > PLEASE do read the posting guide http://www.R-project.org/posting-g > > uide.html[http://www.R-project.org/posting-guide.html] > > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-gui > de.html > and provide commented, minimal, self-contained, reproducible code.
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:> 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 > > >> install.packages("Rmpfr") >> library(Rmpfr) >> ?mpfr >> ?formatMpfr >> formatMpfr(mpfr(1e6, precBits=53), base=62) > [1] "4C92.000000" >> > > On Tue, Aug 9, 2016 at 10:42 AM, <ruipbarradas at sapo.pt> wrote: >> 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>: >> >>> 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 >>> >>> ______________________________________________ >>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >>> https://stat.ethz.ch/mailman/listinfo/r-help >>> PLEASE do read the posting guide >>> http://www.R-project.org/posting-guide.htmland[http://www.R-project.org/posting-guide.htmland] provide commented, >>> minimal, self-contained, reproducible code. >> >> >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help[https://stat.ethz.ch/mailman/listinfo/r-help] >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html[http://www.R-project.org/posting-guide.html] >> and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >