61. . . . . . . . . returns TRUE then X can be termed as a matrix data object.
62. . . . . . . . . package provides basic functionalities in R environment like arithmetic calculations, input/output.
63. What will be the output of the following R code?
> x <- 3
> switch(x, 2+2, mean(1:10), rnorm(5))
> x <- 3
> switch(x, 2+2, mean(1:10), rnorm(5))
64. What will be the output of the following R code?
> x <- 1:4
> lapply(x, runif)
> x <- 1:4
> lapply(x, runif)
65. What will be the output of the following R code?
> x <- c("a", "b", "c", "d")
> for(i in 1:4) {
+ ## Print out each element of 'x'
+ print(x[i])
+ }
> x <- c("a", "b", "c", "d")
> for(i in 1:4) {
+ ## Print out each element of 'x'
+ print(x[i])
+ }
66. . . . . . . . . function gives an error message if the desired package cannot be loaded.
67. What will be the output of the following R code?
> x <- list(a = 1:5, b = rnorm(10))
> lapply(x, mean)
> x <- list(a = 1:5, b = rnorm(10))
> lapply(x, mean)
68. Which of the following R code syntax is syntactically valid?
69. . . . . . . . . function takes various parameters like formula, data, subset, labels, etc.
70. . . . . . . . . functions can be "built which contain all of the necessary data for evaluating the function.
Read More Section(Control Structures in R Programming)
Each Section contains maximum 100 MCQs question on Control Structures in R Programming. To get more questions visit other sections.