[R] printing in binary

jim holtman jholtman at gmail.com
Wed Jun 18 03:08:56 CEST 2008


check out the as.character.binmode in the R.util package:

> ?as.character.binmode
> intToBin(12345)
[1] "11000000111001"
>


On Tue, Jun 17, 2008 at 8:05 PM, Edna Bell <edna.bell01 at gmail.com> wrote:
> Hi r Gurus:
>
> Is there a way to print numbers in binary format, please?
>
> I know that you can use sprintf for hex, but I'm not sure how to get binary.
>
> Thanks
> Edna
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?



More information about the R-help mailing list