I am very new to coding in R and wanted some guidance in how to generate this function.
I have a pool of numbers 0 ,1 ,2 ,3 , 4, 5, 6, 7, 8, 9
that I will draw 3 numbers from that pool to sum.
I would like to run this 100 times.
The 3 numbers that I draw from the pool must be unique. i.e 9,9,9 cannot be drawn from the pool.
The current code i have is this.
numbers_in_box <- c(0,1,2,3,4,5,6,7,8,9)
# sample(numbers_in_box,3, replace = FALSE)
replicate(n = 100,sample(numbers_in_box,3, replace = FALSE),simplify = FALSE)
Thank you