Skip to content
Prev 387841 / 398502 Next

What is an alternative to expand.grid if create a long vector?

Hello,

If you want to process the data by rows, then maybe you should consider 
a custom function that divides the problem in small chunks and process 
one chunk at a time.

But even so, at 8 bytes per double, 100^10 rows is

(100^10*8)/(1024^4)  # Tera bytes
#[1] 727595761

It will take you a very, very long time to process.

Revise the problem?

Hope this helps,

Rui Barradas

?s 13:35 de 19/04/21, Shah Alam escreveu: