Table of Contents

About

Type

Basic

See

?Control

The Control structures are primarily useful for writing programs. In the console, the apply functions (apply, sapply, ..) are most appropriated.

  • if: testing a condition
  • for: execute a loop n number of times
  • while: execute a loop while a condition is true
  • repeat: execute an infinite loop
  • break: break the execution of a loop
  • next: skip an iteration of a loop
  • return: stop the execution of function and return a value

Others