View source: R/adjustmentProb.R
num2Bits | R Documentation |
Given a natural number and number of bits, the function provides an n-dimensional vector of bits that represents num
.
The ith bits of binary vector represents the ith bit of num
.
For example, if vec<-num2Bits(num=2,n=4)
, the first bit vec[1]
is 0 and the second bit vec[2]
is 1.
num2Bits(num, n = 32)
num |
is a natural number. |
n |
is a number of bits representing |
This function returns an n-dimensional vector of bits that represents num
.
num2Bits(num=10,n=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.