We use the R break and next statements to alter the flow of a program. These are also known as jump statements in programming:
break - terminate a looping statement
next - skips an iteration of the loop
R break Statement
You can use a break statement inside a loop (…
Continue reading: R break and …