adplus-dvertising
frame-decoration

Question

What will be the output of the following R code?
> x <- 3
> switch(2, 2+2, mean(1:10), rnorm(5))

a.

5

b.

5.5

c.

NULL

d.

58

Posted under R Programming

Answer: (b).5.5

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following R code?