Which of the following is valid syntax for if else statement in R?
A.
if(<condition>) {
## do something
}
else {
## do something else
}B.
if(<condition>) {
## do something
}
elseif {
## do something else
}C.
if(<condition>) {
## do something
}
else if {
## do something else
}D.
if(<condition>) {
##& do something
}
else {
##@ do something else
}Answer: Option A

Join The Discussion