Abstract
This chapter gives some examples of flow control as well as ways to do the examples using indexing. The first example uses nested for loops and if/else statements. The second example uses the while statement. The third example is of nested for loops. The fourth example uses a for loop, an if statement, and a next statement. The fifth example is of a for loop, a repeat loop, an if statement, and a break statement.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Margot Tollefson
About this chapter
Cite this chapter
Tollefson, M. (2019). Examples of Flow Control. In: R Quick Syntax Reference. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4405-0_13
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4405-0_13
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4404-3
Online ISBN: 978-1-4842-4405-0
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)