File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,11 @@ is.na(mydata$prediction) | mydata$parch >= 1
277
277
# If...Else Conditions {#ifelse}
278
278
279
279
We can use the construction, ` if()...else if()...else() ` if we want to perform conditional operations.
280
+ The typical construction of ` if()...else if()...else() ` operates such that it first checks if the first ` if() ` condition is true.
281
+ If the first ` if() ` condition is true, it performs the operation specified and terminates the process.
282
+ If the first ` if() ` condition is not true, it checks the ` else if() ` conditions in order until one of them is true.
283
+ For the first true ` else if() ` condition, it performs the operation specified and terminates the process.
284
+ If none of the ` else if() ` conditions is true, it performs the operation specified under ` else() ` and then terminates the process.
280
285
The construction, ` if()...else if()...else() ` can only be used on one value at a time.
281
286
282
287
``` {r}
You can’t perform that action at this time.
0 commit comments