Đ Đức Linh New member Sep 20, 2021 #1 What will be the output of the following R code? Code: > x <- 3 > switch(2, 2+2, mean(1:10), rnorm(5)) A. 5 B. 5.5 C. NULL D. 58
What will be the output of the following R code? Code: > x <- 3 > switch(2, 2+2, mean(1:10), rnorm(5)) A. 5 B. 5.5 C. NULL D. 58
T Tiên Hương New member Sep 20, 2021 #2 Answer: b Explanation: If value is a number between 1 and the length of list then the corresponding element of list is evaluated and the result returned. Upvote 0 Downvote
Answer: b Explanation: If value is a number between 1 and the length of list then the corresponding element of list is evaluated and the result returned.