Last chance! 50% off unlimited learning
Sale ends in
base(n, base = 10, num.digits = max(0, floor(log(n, base))) + 1)
n
in.n
in base base
.
By default, num.digits
is equal to just the number of required digits
(i.e., max(0, floor(log(n, base))) + 1)
. num.digits
showing the representation of n
in base base
.base
computes the coefficients
$a_0, a_1, \ldots, a_k$.oneSamplePermutationTest
.# Compute the value of 7 in base 2.
base(7, 2)
#[1] 1 1 1
base(7, 2, num.digits=5)
#[1] 0 0 1 1 1
Run the code above in your browser using DataLab