So I was messing around with some R code and found something that seemed interesting to me. Specifically when I call quit() function it executes without a problem, however when I place the quit function within another function R says the following.
poshQuit<- function(){
quit()
}
poshQuit()
R session aborted. R encountered a fatal error. The session was terminated.
Now this isnt the end of the world as I was just idly messing about in code but I am interested as to why this might be the case and if there are any ways this error can be avoided.
Thanks