R Break Statement
In the R language, the break statement is used to break the execution and for an immediate exit from the loop. In nested loops, break exits from the innermost loop only and control transfer to the outer loop.
It is useful to manage and control the program execution flow. We can use it to various loops like: for, repeat, etc.
There are basically two usages of break statement which are as follows:
Note: We can also use break statement inside the