digits2number | R Documentation |
Takes a vector of integers representing digits in an arbitrary base e.g. binary or octal and converts it into an integer (or the integer divided by base^length(digits) for the number of digits if fractional is TRUE). Note that the first digit in the input is the least significant.
digits2number(digits, base = 2, fractional = FALSE)
digits |
a vector of integers representing digits in an arbitrary base |
base |
the base for the numeral system (e.g. 2 for binary or 8 for octal) |
fractional |
divide the output by the max for this number of digits and base. Note that this is |
an integer
https://en.wikipedia.org/wiki/Radix
digits2number(c(4,4,1),8)
digits2number(number2digits(100))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.