#' Chooses two numbers randomly (with repitition possible) from a set of numbers
#' @param size Our numbers are chosen from 1 to size
#' @param samples The number of pairs to generate
#' @return A list of pairs of numbers chosen randomly
#' @export
choose_pairing <- function(size, samples = 1)
{
rand_nums <- sample.int(size^2, samples)
print(paste(rand_nums, size))
return(list((rand_nums %% size) + 1, ((rand_nums-1) %/% size) + 1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.