rL: Generates one (or more) random vectors of room assignments

Description Usage Arguments Value

View source: R/rand-mechanisms.R

Description

Generates a room assignment vector (or a room assignment matrix) depending on 'n.draws'. For a vector, the entry at index 'i' represents the room to which unit 'i' is to be assigned.

Usage

1
rL(N, M, n.draws = 10)

Arguments

N

An integer. The total number of units in the population.

M

An integer. The number of unit per room.

n.draws

An integer. The number of room assignments vectors to return (defaults to 10).

Value

If 'n.draws = 1' then returns a vector of room assignments. If ‘n.draws > 1’, returns a matrix where each row represents a room assignment vector.


gwb/RGroupFormation documentation built on Sept. 13, 2020, 4:41 p.m.