Question: is if else a control structure?
Answer: The if - else combination is probably the most commonly used control structure in R (or perhaps any language). This structure allows you to test a condition and act on it depending on whether it's true or false. For starters, you can just use the if statement. The above code does nothing if the condition is false.