I'm trying to come up with a quick way of assigning some treatment IDs and...honestly I could do this faster on paper now but I have crossed the line to where I can't stop until I figure this out.
I want to make a table with 35 rows - each row would contain a vector with 9 numbers (between 1 and 12) but EACH ROW MUST BE UNIQUE.
I tried the quick solution that popped into my head:
data.frame(replicate(9,sample(1:12,35, rep = TRUE)))
but this obviously doesn't work for me because of "rep=TRUE" and "rep=FALSE" can't work as written because of the sample pool (1:12). Is there a way of adding make.unique to get at this?
Thanks!