R - Flow (Control Structure)

Card Puncher Data Processing






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


Discover More
Card Puncher Data Processing
R - For

The for flow construct.

Share this page:
Follow us:
Task Runner