binary-methods: Get binary representation

Description Methods Examples

Description

Get binary representation

Methods

signature(object = "integer")

Method for integer Vectors

signature(object = "int64")

Method for int64 vectors

signature(object = "uint64")

Method for uint64 vectors

signature(object = "numeric")

Method for numeric vectors

Examples

1
2
3
4
    binary( 1:4 )
    binary( c( 1.0, 2.0 ) )
    binary( as.int64( 1:4 ) )
    binary( as.uint64( 1:4 ) )

Example output

[1] 00000000000000000000000000000001 00000000000000000000000000000010
[3] 00000000000000000000000000000011 00000000000000000000000000000100
[1] 0011111111110000000000000000000000000000000000000000000000000000
[2] 0100000000000000000000000000000000000000000000000000000000000000
[1] 0000000000000000000000000000000000000000000000000000000000000001
[2] 0000000000000000000000000000000000000000000000000000000000000010
[3] 0000000000000000000000000000000000000000000000000000000000000011
[4] 0000000000000000000000000000000000000000000000000000000000000100
[1] 0000000000000000000000000000000000000000000000000000000000000001
[2] 0000000000000000000000000000000000000000000000000000000000000010
[3] 0000000000000000000000000000000000000000000000000000000000000011
[4] 0000000000000000000000000000000000000000000000000000000000000100

int64 documentation built on May 2, 2019, 6:50 p.m.