sq: Generate binary sequences

View source: R/sq.R

sqR Documentation

Generate binary sequences

Description

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

Usage

sq(J, s = NULL)

Arguments

J

length of the binary sequences

s

sum of the binary sequences (optional)

Value

M

Matrix of binary configurations

Author(s)

Francesco Bartolucci (University of Perugia)

Examples

# 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 March 7, 2023, 6:15 p.m.