I think this might do what you want. y1
will contain all of your first draws in a pair and y2
will contain all of the second. the pmax
function takes the larger of each of these and the matrix command puts the data into a matrix with 1020 rows and 10000 columns. You might want to replace some of these 'magic' numbers with variables in your script so that you can easily try small samples for testing purposes.
y1 <- sample(data, 1020 * 10000, replace = TRUE)
y2 <- sample(data, 1020 * 10000, replace = TRUE)
bigDat <- matrix( pmax(y1, y2), nrow = 1020)