2

I'm invoking RScript via this command:

RScript myScript.R var1, var2, var3

This works if the length of variables is small. However, as soon as it exceeds a certain length (say over a 1000 characters) it breaks. Is there a limit to the length of string variables I can pass and/or is there a limit to the total (var1 + var2 + var3) data size I'm able to pass as arguments to the RScript.

Thanks!

Najla August
  • 81
  • 1
  • 12

1 Answers1

2

The maximum length of the command line arguments is determined by the operating system and shell you are using.

If you are using Linux you can query the max length:

~$ getconf ARG_MAX
2097152

PS: The max length could be restricted by the implementation of RScript (no idea about this).

R Yoda
  • 8,358
  • 2
  • 50
  • 87