Description Usage Arguments Value References Examples

Takes an integer and converts it into an arbitrary base e.g. binary or octal. Note that the first digit in the output is the least significant.

1 | ```
number2digits(n, base = 2)
``` |

`n` |
the integer to be converted |

`base` |
the base for the numeral system (e.g. 2 for binary or 8 for octal) |

a vector of length `ceiling(log(n+1,base))`

respresenting each digit for that numeral system

https://en.wikipedia.org/wiki/Radix

1 2 | ```
number2digits(100)
number2digits(100,8)
``` |

vipor documentation built on May 29, 2017, 9:38 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.