make_random_block {autoFC}  R Documentation 
Returns a matrix of randomly paired blocks where each row represents a block.
make_random_block(total_items, target_items = total_items, item_per_block)
total_items 
Integer value. Determines the total number of items we sample from. 
target_items 
Integer value. Determines the number of items to use from

item_per_block 
Integer value. Determines the number of items in each item block. Should be no less than 2. 
Given the total number of items to pair from, number of items to build
paired blocks and number of items in each block,
make_random_block
produces a matrix randomly paired blocks
where each row represents a block.
It can also accommodate cases when target_items
is not a multiple of item_per_block
.
Can be used as initial solution for other functions in this package.
A matrix of integers indicating the item numbers, where the number of rows
equals target_items
divided by item_per_block
, rounded up,
and number of columns equals item_per_block
.
If target_items
is not a multiple of item_per_block
,
the item set produced by target_items
will be looped
until number of sampled items becomes a multiple of item_per_block
.
Mengtong Li
# Try out cases where you make target_items the default.
make_random_block(60, item_per_block = 3)
# You can also set your own values of target_items.
make_random_block(60, 45, item_per_block = 3)
# Also see what happens if target_items is not a multiple of item_per_block.
make_random_block(60, 50, item_per_block = 3)