expand.gridを使用して への呼び出しを作成し、評価しましたeval(parse(...))。
要するに:
len <- 36
Text <- paste("pos <- expand.grid(",
paste(rep("c(TRUE,FALSE)", len), collapse=","), ")", sep="")
eval(parse(text = Text))
私に与えます
Error in rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) :
invalid 'times' value
In addition: Warning message:
In rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) :
NAs introduced by coercion
変数内の/lenの組み合わせの数とは対照的です。TRUEFALSEpos
私は単純なものを見落としていますか、それともそうではないでしょうか...?