Learn R Programming

randomizationInference (version 1.0.1)

completeRand: Permutations of Treatment Assignments for Completely Randomized Designs

Description

Randomly permutes an assignment vector or matrix according to a completely randomized design, for a specified number of permutations.

Usage

completeRand(w, nperm)

Arguments

w
a vector or matrix of assignments.
nperm
a number specifying the desired number of random permutations.

Value

  • A list of permuted assignment vectors or matrices.

Details

If w is a matrix, the permutations occur by row.

See Also

blockRand, latinRand

Examples

Run this code
w1 = c(0,0,0,0,1,1,1,1)
completeRand(w1, nperm = 5)

w2 = c(0,1,0,1,0,1,0,1)
completeRand(w = cbind(w1,w2), nperm = 5)

Run the code above in your browser using DataLab