powered by
Generate binary sequences of a certain length and with a certain sum.
sq(J, s = NULL)
Matrix of binary configurations
length of the binary sequences
sum of the binary sequences (optional)
Francesco Bartolucci (University of Perugia)
# generage all sequence of 5 binary variables sq(5) # generage all sequence of 5 binary variables, with sum equal 2 sq(5,2)
Run the code above in your browser using DataLab