Friday, 13 September 2013

Using quit/q in a function causes RStudio to fatal error

Using quit/q in a function causes RStudio to fatal error

More of a curiosity but when you use q or quit inside of a function inside
of R studio it causes a fatal error as seen here:

But the same function in rgui causes R to stop as usual. And using just
q() in RStudio closes R as expected. Why does q in a function cause
RStudio to literally bomb?
Example function that causes the bomb:
FUN <- function() q()
FUN()
Here's my sessionInfo:
R Under development (unstable) (2013-09-04 r63830)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.1.0
RStudio Version 0.97.551

No comments:

Post a Comment