2012-07-25 37 views
3

我創建和使用eval(parse(...))評價expand.grid通話。奇數錯誤()

簡而言之:

​​

給我

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 

如在可變pos反對數lenTRUE/FALSE組合。

我俯瞰簡單的東西,或者也許不是......?

+1

'foo'太長。 2^36比較大。可能你發現了一個在'expand.grid'中出現的bug很長的矢量,但是我不會對它下注。 – joran 2012-07-25 17:47:27

+1

這有什麼做'eval'或'parse'。該錯誤在'expand.grid'中。 – 2012-07-25 17:51:37

+1

我可以達到2^24左右,但除此之外我遇到了麻煩。 – joran 2012-07-25 17:54:29

回答

4

正如我在評論中所說的,這與evalparse無關。該錯誤是在expand.grid。問題是在於R的最大矢量長度爲2^31-1和rep.int試圖創建一個2^36長度矢量。