sq: Generate binary sequences

Description Usage Arguments Value Author(s) Examples

View source: R/sq.R

Description

Generate binary sequences of a certain length and with a certain sum.

Usage

1
sq(J, s = NULL)

Arguments

J

length of the binary sequences

s

sum of the binary sequences (optional)

Value

M

Matrix of byary configurations

Author(s)

Francesco Bartolucci (University of Perugia)

Examples

1
2
3
4
# generage all sequence of 5 binary variables
sq(5)
# generage all sequence of 5 binary variables, with sum equal 2
sq(5,2)

cquad documentation built on Oct. 23, 2020, 7:55 p.m.