I have a Grid with n*m size and pch Symbols from 1-13 with 8 Colors(so 104 different combinations)
Grid empty:
And now I am trying to draw the symbols as pairs randomly onto my grid. My thinking was I create a matrix with the same size as my grid and random integer numbers and a data frame with all combinations of pch and color and draw them on the grid.
My Goal:
row <- 4
col <- 13
n <- row * col
plot.new()
plot.window(xlim = c(1, col), ylim = c(1, row))
grid(nx = col, ny = row, col = "black")
box(lwd = 2)
axis(1, at=1:col,tick=FALSE,las = 1)
axis(2,at = 1:row,tick= FALSE,las = 2)
pch_v <- c(1:13)
col_v <- c(1:8)
board <- matrix(sample(1:n),nrow = row,ncol=col)
unique_combination <- expand.grid(pch_v,col_v)
Thats the point where I am stuck. If somebody got an idea I would appreciate it.