What will be the output of the following R code? [code] > y <- "fruit" > switch(y, fruit = "banana", vegetable = "broccoli", "Neither") [/code]

Hằng Đoàn

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

Tìm kiếm

Back
Top