Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/r-utility-binary-integer.R
This function converts an integer to the corresponding binary vector using the natural binary code. It is used in examples presented in the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/data_mining_algorithms for more details.
1 | int2binvec(v, max = 255)
|
v |
an integer value |
max |
a maximum integer value to be represented |
The input value is converted to a binary code word, ordered
from the least significant bits to the most significant bits, of
length sufficient to represent the maximum value specified by max.
An integer vector of 0's and 1's, representing v in
natural binary code.
Pawel Cichosz <p.cichosz@elka.pw.edu.pl>
1 2 | int2binvec(11, max=15)
int2binvec(11, max=63)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.