I have a table of bit masks (for aircraft identification purposes, in case you are curious).
Something like:
state_block <- tribble(
~state, ~num_addr, ~mask,
"Afghanistan", 4096, 011100000000,
"Albania", 1024, 01010000000100,
"Algeria", 32768, 000010100,
"Angola", 4096, 000010010000,
"Antigua and Barbuda", 1024, 00001100101000
# 185 more
}
The mask
column is about the initial pattern of a 24 bit aircraft address.
Is there in R a literal representation for integers in binary form, something like 0b101
in Java or C++14?
And if not, any suggestions as how to proceed (i.e. define a custom type?)?
Thanks!