Learn R Programming

Counternull (version 0.2.12)

create_randomization_matrix: Create Randomization Matrix

Description

Creates randomization matrix of assignments for given number of units and permutations.Returns matrix with unique randomized permutations.

Usage

create_randomization_matrix(units, n, block = NULL)

Value

Matrix with unique randomized permutations

Arguments

units

Number of units in dataset

n

Number of permutations

block

Numeric vector with length equal to "units" indicating block assignments for each unit (optional)

Details

Note, if the number of specified permutations exceeds the maximum number of unique permutations, the matrix returned will contain the maximum number of permutations.

Examples

Run this code
create_randomization_matrix(14,128,rep(1:7, each = 2))

Run the code above in your browser using DataLab