How to solve ‘protection stack overflow’ issue in R Studio

@Ansjovis86

You can specify the ppsize as a command line argument to Rstudio

rstudio.exe --max-ppsize=5000000

You may also with to set the expression option via your .Rprofile or at runtime by using the options(expressions = 5e5) command.

> options(expressions = 5e5)
>?options

expressions:

sets a limit on the number of nested expressions that will be evaluated. Valid values are 25…500000 with default 5000. If you increase it, you may also want to start R with a larger protection stack; see –max-ppsize in Memory. Note too that you may cause a segfault from overflow of the C stack, and on OSes where it is possible you may want to increase that. Once the limit is reached an error is thrown. The current number under evaluation can be found by calling Cstack_info.

Cstack_info() - to determine current setting.s

Leave a Comment