Vidyalelo
R Programming · all questions

Control Structures in R Programming
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

207

Questions

3/11

Page

Pick an option on a question to see the right answer and solution.

R Commander is used to . . . . . . . . in R.

Select an option to see the answer and solution.

R has . . . . . . . . basic indexing operators.

Select an option to see the answer and solution.

Which of the following code skips the first 20 iterations?

Options are not available for this question.

Select an option to see the answer and solution.

If the function in a console is.matrix(X) returns true then X can be considered as a . . . . . . . .

Select an option to see the answer and solution.

How is a Data object represented internally in R language?

Select an option to see the answer and solution.

Point out the wrong statement?

Select an option to see the answer and solution.

Point out the wrong statement?

Select an option to see the answer and solution.

Point out the correct statement?

Select an option to see the answer and solution.

. . . . . . . . function can be used to add datasets in R provided with the columns in the datasets should be the same.

Select an option to see the answer and solution.

If the programmers want the output to be a data frame or a vector, then . . . . . . . . function is used.

Select an option to see the answer and solution.

. . . . . . . . loop over a list and evaluate a function on each element.

Select an option to see the answer and solution.

Point out the correct statement?

Select an option to see the answer and solution.

Point out the correct statement?

Select an option to see the answer and solution.

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(NA)

Select an option to see the answer and solution.

Point out the wrong statement?

Select an option to see the answer and solution.

What is the command used to store R objects in a file?

Select an option to see the answer and solution.

Which of the following R code will print "Neither"?

Select an option to see the answer and solution.

. . . . . . . . function generates "n" normal random numbers based on the mean and standard deviation arguments passed to the function.

Select an option to see the answer and solution.

What will be the output of the following R code?
> x <- list(a = matrix(1:4, 2, 2), b = matrix(1:6, 3, 2))
> lapply(x, function(elt) { elt[,1] })

Select an option to see the answer and solution.

. . . . . . . . is the easiest method for reshaping the data before analysis.

Select an option to see the answer and solution.