Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread Paul Bernal
Thank you Richard. Best regards, Paul El vie., 27 de diciembre de 2019 4:27 p. m., Richard O'Keefe < rao...@gmail.com> escribió: > The specific problem you are trying to solve is so constrained that > you do not need a > general purpose method. > You start with a string that contains

Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread Paul Bernal
Thank you very much Rui. Best regards! El vie., 27 de diciembre de 2019 4:22 p. m., Rui Barradas < ruipbarra...@sapo.pt> escribió: > Hello, > > You forgot to cc the list, I'm replying all to have a complete thread so > that others now and in the future can search similar problems they might >

Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread Richard O'Keefe
The specific problem you are trying to solve is so constrained that you do not need a general purpose method. You start with a string that contains characters drawn from a *subset* of ASCII with at most 64 elements. Accordingly, all you need is a table mapping characters to 6-character strings.

Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread Rui Barradas
Hello, You forgot to cc the list, I'm replying all to have a complete thread so that others now and in the future can search similar problems they might encounter. The following function bin2dec works as expected. bin2dec <- function(x){ s <- strsplit(x, "") s <- lapply(s, function(x){

[R] spurious locking of packages

2019-12-27 Thread Jan Galkowski
I have been having a problem installing binary packages on Windows, since 3.6.x hit the streets. I am using the > > INSTALL_opts = c('--no-lock') > option, but it occurs nevertheless. My habit is to install an update of R (latest, 3.6.2), then run update.packages(.): > > trying URL >

Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread Rui Barradas
Hello, Your code and the answers provided, specially Marc's, led me to utf8ToBin <- function(x, out = c("ascii", "dec", "bin")){ out <- match.arg(out) ascii_datformat <- utf8ToInt(x) Base <- ascii_datformat - 48 Base <- ifelse(Base > 40, Base - 8, Base) Bin <-

Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread William Michels via R-help
Hi Paul, Since you start from strings, it's not clear to me where ASCII enters the picture. If you really need ASCII, you can use the charToInt() function in the "R.oo" package. Also there's the AsciiToInt() function in the "sfsmisc" package. If you just want to use R's native as.numeric()

Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread Richard M. Heiberger
Use the Rmpfr package. it will print numbers in any base from 2 to 62 > library(Rmpfr) > ?Rmpfr > b15 <- mpfr(15, precBits=6) > formatBin(b15) [1] +0b1.11100p+3 > On Fri, Dec 27, 2019 at 10:43 AM Paul Bernal wrote: > > Dear friends, > > Hope you are all doing well. I need to find a way to

Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread Paul Bernal
Dear Jeff, Hope you are doing great. The link I provide below has the results I am expecting. I am doing a test, trying to convert this string: "133m@ogP00PD ;88MD5MTDww@2D7k" into ascii numbers, then to decimal, and ultimately, into binary. I am trying to recreate the results obtained in the

Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread Jeff Newmiller
Your question is incomplete... what do you expect the result to be? Perhaps [1] is relevant? [1] https://stackoverflow.com/questions/52298995/r-binary-decimal-conversion-confusion-ais-data On December 27, 2019 7:42:36 AM PST, Paul Bernal wrote: >Dear friends, > >Hope you are all doing well. I

Re: [R] Converting Decimal numbers into Binary

2019-12-27 Thread Marc Schwartz via R-help
> On Dec 27, 2019, at 10:42 AM, Paul Bernal wrote: > > Dear friends, > > Hope you are all doing well. I need to find a way to convert ascii numbers > to six digit binary numbers: > > I am working with this example, I converted the string to ascii, and > finally to decimal, but I am having

[R] Converting Decimal numbers into Binary

2019-12-27 Thread Paul Bernal
Dear friends, Hope you are all doing well. I need to find a way to convert ascii numbers to six digit binary numbers: I am working with this example, I converted the string to ascii, and finally to decimal, but I am having trouble converting the decimal numbers into their six digit binary

Re: [R-es] PANDOC

2019-12-27 Thread Javier Marcuzzi
Estimados Paso un tiempo, pero hoy instale ubuntu y versiones de R de la comunidad (no Microsoft R Open), junto a RStudio, no tuve inconvenientes en correr el ejemplo propuesto, en mi caso ahora funciona, posiblemente es tarde, pero lo comparto. Javier Marcuzzi El sáb., 12 oct. 2019 a las

Re: [R] What is best way to calculate % of time?

2019-12-27 Thread Neotropical bat risk assessments
Tnx all for the helpful suggestions. Life is good. Happy holidays Bruce -- Bruce W. Miller, PhD. Neotropical bat risk assessments Conservation Fellow - Wildlife Conservation Society If we lose the bats, we may lose much of the tropical vegetation and the lungs of the planet Using acoustic

Re: [R] What is best way to calculate % of time?

2019-12-27 Thread PIKAL Petr
Well If you can make ggplot based on your data, there should be a way to produce summary. Just as curiosity, the data you showed us are the same as you use for ggplot construction? Maybe I misunderstood your question but let's assume you have records from each location but only BUZZ time is