7) Conditionals
📖 Lecture
This week we introduce the notion of R expressions, and we provide the syntax used by R to handle if-else statements and related conditionals constructs.
🎯 Objectives
At the end of this week you will be able to:
- Write if-else statements to handle simple conditions
- Use the vectorized function
ifelse()
- Describe what curly braces
{...}
are used for in R.
📚 Reading
🔬 Lab
Work with some basic if-else statements and related functions.