Control Structures In R Programming - Study Mode

[#126] In R, what does the repeat loop combined with next do?
Correct Answer

(C) Repeats a block of code a specified number of times and skips to the next iteration

[#127] A function, together with an environment, makes up what is called a . . . . . . . . closure.
Correct Answer

(B) function

[#128] Body of lapply function is?
Correct Answer

(A) function (X, FUN, ...) { FUN <- match.fun(FUN) if (!is.vector(X) || is.object(X)) X <- as.list(X) .Internal(lapply(X, FUN)) }

[#129] . . . . . . . . is used to break the execution of a loop.
Correct Answer

(C) break

[#130] Write a function to extract the first name in the string "Mrs. Jake Luther"?
Correct Answer

(B) Substr