Odd failure in eval(parse(...)). Simple answer?
I've been playing with `eval(parse(...))` in R and I've run into a bump.

In short:

    foo <- 1:36
    eval(parse(text = paste("pos <- expand.grid(", paste(rep("c(TRUE, FALSE)", length(foo)), collapse = ","), ")", sep = "")) )

Gives me:

    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

As opposed to my lovely combinations of TRUE/FALSE for each item in `foo` in a variable `pos`. `foo` is of arbitrary length.

I am overlooking something simple, or maybe not...?
Odd failure in eval(parse(...)). Simple answer?
===

I've been playing with `eval(parse(...))` in R and I've run into a bump.

In short:

    foo <- 1:36
    eval(parse(text = paste("pos <- expand.grid(", paste(rep("c(TRUE, FALSE)", length(foo)), collapse = ","), ")", sep = "")) )

Gives me:

    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

As opposed to my lovely combinations of TRUE/FALSE for each item in `foo` in a variable `pos`. `foo` is of arbitrary length.

I am overlooking something simple, or maybe not...?