How to crash R?

The easiest way is to call C-code. C provides a standard function abort()[1] that does what you want. You need to call: .Call("abort").

As @Phillip pointed out you may need to load libc via:

  • on Linux, dyn.load("/lib/x86_64-linux-gnu/libc.so.6") before issuing .Call("abort"). The path may of course vary depending on your system.

  • on OS X, dyn.load("/usr/lib/libc.dylib")

  • on Windows (I just tested it on XP as I could not get hold of a newer version.) you will need to install Rtools[2]. After that you should load dyn.load("C:/.../Rtools/bin/cygwin1.dll").

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)