joshkatz / r-script

A simple little module for passing data from NodeJS to R (and back again).
MIT License
161 stars 67 forks source link

Error: spawn E2BIG #17

Open SalvoLunar opened 6 years ago

SalvoLunar commented 6 years ago

I'm getting this error message when the json I'm passing is large. is there any workaround for it?

DrMMu commented 6 years ago

There is a limit on how many characters child_process.spawn() can pass to a program (R in this case). Obviously, you are beyond that limit.

A workaround would be to store the data your R program needs in a separate file -- and only pass the name of that file to R.