Simple command to tell an file.R to stop the execution

rstudio

#1

What command can I use to tell R that the execution of an file.R stop in a given line?


#2

You can use stop to signal an error or use quit or q directly to quit the session.
But what is your ultimate goal? Why would you have anything after the line that supposed to stop execution of the script?


#3

browser() if you want to debug code.