KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've created and evaluated a call to expand.grid by using eval(parse(...)) . In short: len <- 36 Text <- paste("pos <- expand.grid(", paste(rep("c(TRUE,FALSE)", len), collapse=","), ")", sep="") eval(parse(text = Text)) 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 len number of combinations of TRUE / FALSE in the variable pos . I am overlooking something simple, or maybe not...?
Tags (comma-separated)
Save Edits
Cancel