Control Structures In R Programming - Study Mode

[#76] Write the syntax to set the path of the current working directory in R environment?
Correct Answer

(C) Setwd("dir_path")

[#77] Which of the following language supports lexical scoping?
Correct Answer

(D) All of the mentioned

[#78] What will be the value of following R expression?
Correct Answer

(B) Error in log(c(-1, 2)): NaNs produced

[#79] What will be the output of the following R code? > x <- 3
> switch(6, 2+2, mean(1:10), rnorm(5))
Correct Answer

(C) NULL

[#80] Warnings are generated by the . . . . . . . . function.
Correct Answer

(A) warning()