latinSquare: Latin Square

View source: R/experiments.R

latinSquareR Documentation

Latin Square

Description

Returns a latin square where each index 1:order occurs in each row as well as in each column.

Usage

latinSquare(order, seed = NULL)

Arguments

order

An integer value of 2 or higher, setting the size of the latin square.

seed

Optional seed for the random number generator

Details

If you want the same latin square repeatedly, set the seed argument.

Value

A matrix of size order x order

Examples

latinSquare(5)

thartbm/handlocs documentation built on Feb. 18, 2025, 10:53 p.m.