Generating a very large matrix of string combinations using combn() and bigmemory package
I have a vector x of 1,344 unique strings. I want to generate a matrix that gives me all possible groups of three values, regardless of order, and export that to a csv. I'm running R on EC2 on a m1.large instance w 64bit Ubuntu. When using combn(x, 3) I get an out of memory error: Error: cannot allocate vector of size 9.0 Gb The size of the resulting matrix is C1344,3 = 403,716,544 rows and three columns - which is the transpose of the result of combn() function. I thought of using the bigmemory package to create a file backed big.matrix so I can then assign the results of the combn() function