[R] BaseX

Duncan Murdoch murdoch.duncan at gmail.com
Tue Aug 9 18:45:18 CEST 2016


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.



More information about the R-help mailing list