Which of the following R code will print “Neither”?

Như Quỳnh

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

Tìm kiếm

Back
Top