Question
> x <- 3
> switch(x, 2+2, mean(1:10), rnorm(5))
a.
2.2903605 2.3271663 -0.7060073 1.3622045 -0.2892720
b.
5.5
c.
NULL
d.
Error
Posted under R Programming
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?
Similar Questions
Discover Related MCQs
Q. Point out the correct statement?
View solution
Q. Point out the correct statement?
View solution
Q. Which of the following R code will print “Neither”?
View solution
Q. R has ________ basic indexing operators.
View solution
Q. The syntax of the for loop is?
View solution
Q. Which of the following R code syntax is syntactically valid?
View solution
Q. Which of the following is apply function in R?
View solution
Q. Point out the correct statement?
View solution
Q. Functions are defined using the _________ directive and are stored as R objects.
View solution
Q. Point out the wrong statement?
View solution
Q. Which of the following R code will print “Hello, world!”?
View solution
Q. Point out the correct statement?
View solution
Q. The __________ function returns a list of all the formal arguments of a function.
View solution
Q. Point out the wrong statement?
View solution
Q. You can check to see whether an R object is NULL with the _________ function.
View solution
Q. Which of the following code will print NULL?
View solution
Q. R Commander is used to ___________ in R.
View solution
Q. Two vectors M and N are defined as M <- c(3, 2, 4) and N <- c(1, 2). What will be the output of vector Z that is defined as Z <- M*N.
View solution
Q. How missing values and impossible values are represented in R language?
View solution
Q. CRAN package ecosystem has more than ______ packages.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond R Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!