lsq: Latin Square

Description Usage Arguments Value Author(s) References Examples

Description

A Latin square is a matrix of n * n elements. Precisely, a Latin square consists of n sets of the numbers 1 to n arranged in such a way to avoid orthogonality (a row or a column will not contain the same number twice).

Usage

1
lsq(size, rep = 1, seed = NA, id = FALSE)

Arguments

size

An integer value for the size of the design.

rep

An integer value for repetition design.

seed

A value to generate a random distribution. The argument seed is useful because it assures the same distribution in case of replication.

id

A logical value indicating whether an id should be attributed for each element of the matrix.

Value

A Latin square object with class matrix.

Author(s)

Daniel Marcelino

References

Tarry, G. (1900) Le probleme de 36 officiers. Compte Rendu de l'Assoc. Francais Avanc. Sci. Naturel, 1, 122–123.

Tarry, G. (1901) Le probleme de 36 officiers. Compte Rendu de l'Assoc. Francais Avanc. Sci. Naturel, 2, 170–203.

Examples

1
lsq(4, 2, seed = 51)

SciencePo documentation built on May 2, 2019, 5:53 p.m.