View source: R/augment_matrix_random_block.R
augment_matrix_random_block | R Documentation |
This function selects a random 2x2 block of values in the input matrix table
and modifies them
based on the specified delta. It checks certain conditions before applying the modifications to
the selected block. The process repeats until a valid block is found or a maximum of 100 iterations
is reached.
augment_matrix_random_block(table, delta)
table |
A matrix (numeric) to which the random block adjustment will be applied. |
delta |
A numeric value that determines the magnitude of the adjustment. If positive, values are subtracted from the block; if negative, values are added. |
A matrix (numeric) with the adjusted 2x2 block.
table <- matrix(1:9, 3, 3)
augment_matrix_random_block(table, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.