shuffleWithBlocks: Generate a order for elements that is shuffled in blocks

Description Usage Arguments Examples

View source: R/shuffle_with_blocks.R

Description

The resulting order preserves the original order, but shuffles (a) equal numeric entries (11, 11, 11) among each other and (b) shuffles equal letter entries ('A', 'A', 'B', 'B') in blocks so that the order within the letter is preserved, but the letters are randomly ordered.

Usage

1
shuffleWithBlocks(desired_order)

Arguments

desired_order

alphanumeric vector consisting of natural numbers and letters

Examples

1
2
desired_order = c(1,2,3,4,5,'A','A','B','B',10,11,11,11,11,15,16,17)
shuffleWithBlocks(desired_order)

grebbel/formr_test documentation built on May 17, 2019, 8:34 a.m.