>cbn<-as.matrix(expand.grid( rep( list(0:1), 50))) 

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

But I'm only interested in cbn matrix rows where:
cbn<- cbn[rowSums(cbn)==5,] 

Is there a way to evaluate it row by row and only store where the sum is
equal to 5, maybe it reduces cost of computation?
-- 
View this message in context: 
http://www.nabble.com/expand.grid-overflows--tf4820635.html#a13791428
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to