61. What will be the output of the following R code?
> x <- 3
> switch(2, 2+2, mean(1:10), rnorm(5))
> x <- 3
> switch(2, 2+2, mean(1:10), rnorm(5))
62. What will be the output of the following R code snippet?
> f <- function(num = 1) {
+ hello <- "Hello, world!\n"
+ for(i in seq_len(num)) {
+ cat(hello)
+ }
+ chars <- nchar(hello) * num
+ chars
+ }
> f()
> f <- function(num = 1) {
+ hello <- "Hello, world!\n"
+ for(i in seq_len(num)) {
+ cat(hello)
+ }
+ chars <- nchar(hello) * num
+ chars
+ }
> f()
63. . . . . . . . . function can be used to select the random sample of size 'n' from a huge dataset.
64. . . . . . . . . package in R language provides various options for re-randomization and permutations based on statistical tests.
65. . . . . . . . . can be used for storing the data for long-term.
66. What will be the output of the following R code?
> g <- function(x) {
+ a <- 3
+ x+a+y
+ ## 'y' is a free variable
+ }
> y <- 3
> g(2)
> g <- function(x) {
+ a <- 3
+ x+a+y
+ ## 'y' is a free variable
+ }
> y <- 3
> g(2)
67. What is the memory limit in R for 64 bit system?
68. Which of the following code will print NULL?
69. The current user defined objects like lists, vectors, etc. is referred to as . . . . . . . . in the R language.
70. If two vectors with different lengths perform some operation, the elements of the shorter vector will be used again to complete the operation. This is referred to as . . . . . . . .
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.