Run the script using hard drive

时间:2016-03-02 10:56:50

标签: r performance memory permutation hard-drive

Given a set of n inputs, I want to generate all permutations of 0's and 1's (essentially the input matrix for a truth table). In order to do so, I am using the permutations command (using the gtools package) in R, as follows:

> permutations(2,n,v=c(0,1),repeats.allowed=TRUE)

where n is the number of inputs.

However, given sufficiently large number of n (let's say 26), the size of the variable becomes very high (if n=26, the variable would be approx. 13GB in size). Given this, I wanted to know if there is any way (in R) of using the hard disk instead of creating the variable on the RAM? (I might actually have to run this with n = 86 which would be an impossible thing to do on the RAM).

0 个答案:

没有答案