shuffBlockVec: Block shuffle a binary vector

View source: R/utils.R

shuffBlockVecR Documentation

Block shuffle a binary vector

Description

Randomly shuffle runs of 0s & 1s in a vector. Do not maintain the alternating order of 0s & 1s. We assume that the vector consists of 0s & 1s.

Usage

shuffBlockVec(x)

Arguments

x

a numeric vector

Value

a numeric vector

Examples

library(ARCOS)
set.seed(7)
x <- round(runif(20))
ARCOS:::shuffBlockVec(x)

dmattek/ARCOS documentation built on Dec. 5, 2024, 11:02 p.m.