81. Which of the following R code will print "Hello, world!"?
82. What will be the output of the following R code snippet?
> f <- function(a, b) {
+ print(a)
+ print(b)
+ }
> f(45)
> f <- function(a, b) {
+ print(a)
+ print(b)
+ }
> f(45)
83. The syntax of the repeat loop is . . . . . . . .
84. In the base graphics system, which function is used to add elements to a plot?
85. Which of the following R code generate a uniform random number?
86. Which function is used to select variables and observations from a given dataset?
87. Point out the correct statement?
88. Point out the wrong statement?
89. What will be the output of the following R code?
> printmessage <- function(x) {
+ if(x > 0)
+ print("x is greater than zero")
+ else
+ print("x is less than or equal to zero")
+ invisible(x)
+ }
> printmessage(1)
> printmessage <- function(x) {
+ if(x > 0)
+ print("x is greater than zero")
+ else
+ print("x is less than or equal to zero")
+ invisible(x)
+ }
> printmessage(1)
90. . . . . . . . . is an indication that a fatal problem has occurred and execution of the function stops.
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.