Learn R Programming

Minirand (version 0.1.3)

blkrandomization: Blocked randomization

Description

The fuction is used to generate treatment assignments based on blocked randomization.

Usage

blkrandomization(n, blocksize, block)

Arguments

n

numeric number of subjects who will be randomized

blocksize

numeric value of block size used for blocked randomization

block

vector of treatment blocks used for blocked randomization

Value

trt a sequence of treatment assignments

Examples

Run this code
# NOT RUN {
blocksize <- 4
block <- c(1, 2, 3, 4) # treatment 1, 2, 3, 4
n <- 35
blkrandomization(n, blocksize, block)
# }

Run the code above in your browser using DataLab