fork download
  1. b0=rbind(letters[1:10],LETTERS[1:10])
  2. b1=as.list.data.frame(data.frame(b0,stringsAsFactors = F))
  3. b2=Reduce(function(v1,v2){
  4. Reduce(rbind,lapply(v2,function(x){
  5. cbind(v1,x)
  6. }))
  7. },b1)
  8. dim(b2)
  9. head(b2)
  10. tail(b2)
  11.  
Success #stdin #stdout 0.25s 39672KB
stdin
Standard input is empty
stdout
[1] 1024   10
     v1  x   x   x   x   x   x   x   x   x  
[1,] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j"
[2,] "A" "b" "c" "d" "e" "f" "g" "h" "i" "j"
[3,] "a" "B" "c" "d" "e" "f" "g" "h" "i" "j"
[4,] "A" "B" "c" "d" "e" "f" "g" "h" "i" "j"
[5,] "a" "b" "C" "d" "e" "f" "g" "h" "i" "j"
[6,] "A" "b" "C" "d" "e" "f" "g" "h" "i" "j"
        v1  x   x   x   x   x   x   x   x   x  
[1019,] "a" "B" "c" "D" "E" "F" "G" "H" "I" "J"
[1020,] "A" "B" "c" "D" "E" "F" "G" "H" "I" "J"
[1021,] "a" "b" "C" "D" "E" "F" "G" "H" "I" "J"
[1022,] "A" "b" "C" "D" "E" "F" "G" "H" "I" "J"
[1023,] "a" "B" "C" "D" "E" "F" "G" "H" "I" "J"
[1024,] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J"