Learn R Programming

protViz (version 0.7.9)

blockRandom: Derive a randomization of a table.

Description

Derive a randomization of a table.

Usage

blockRandom(S, x = NA, check = TRUE)

Value

returns a randomization order.

Arguments

S

a data.frame

x

the column name of the group used for the block randomization.

check

check if the size of each group is equal.

Examples

Run this code

set.seed(1)
iris[c(1:2, 51:52, 101:103), ] |>
  blockRandom(x = "Species", check=FALSE)

Run the code above in your browser using DataLab