What command can I use to tell R that the execution of an file.R stop in a given line?
You can use
stop to signal an error or use
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?
browser() if you want to debug code.