powered by
vectorized revbin function
vrevbin(x, m)
a vector of n positive integers
a binary vector of length nm, such that each length of m has only one 1 and rest as 0
a positive integer
vrevbin(x=c(0,0,1,0,1,0), m = 3);
Run the code above in your browser using DataLab