What will be the output of the following R code?
> y <- "fruit"
> switch(y, fruit = "banana", vegetable = "broccoli", "Neither")
> y <- "fruit"
> switch(y, fruit = "banana", vegetable = "broccoli", "Neither")A. "banana"
B. "Neither"
C. "broccoli"
D. Error
Answer: Option A

Join The Discussion