R Programming MCQs with answers Page - 120

Here, you will find a collection of MCQ questions on R Programming. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. What does the next statement do in R?

  • (A) Jumps to the next iteration of the loop
  • (B) Ends the loop immediately
  • (C) Skips the next condition in an if-else statement
  • (D) Moves to the next element in a vector

A

Admin • 833.24K Points
Coach

Q. In R, what is the purpose of the repeat loop?

  • (A) To repeat a block of code until a certain condition is met
  • (B) To repeat a block of code a specified number of times
  • (C) To repeat a block of code indefinitely
  • (D) To repeat a block of code based on a specific condition

A

Admin • 833.24K Points
Coach

Q. What is the result of the expression 5 %% 2 in R?

  • (A) 1
  • (B) 2
  • (C) 2.5
  • (D) 0.5

A

Admin • 833.24K Points
Coach

Q. In R, what is the role of the ifelse() function?

  • (A) To check a single condition and execute different code based on the result
  • (B) To iterate over elements of a vector and apply a condition
  • (C) To generate random numbers based on a condition
  • (D) To switch between different conditions and values

A

Admin • 833.24K Points
Coach

Q. What does the 'pch' option to par() control?

  • (A) the size of the plotting symbol in a scatterplot
  • (B) the line width in the base graphics system
  • (C) the orientation of the axis labels on the plot
  • (D) the plotting symbol/character in the base graphics system

A

Admin • 833.24K Points
Coach

Q. Which of the following is a principle of analytic graphics?

  • (A) Don't plot more than two variables at at time
  • (B) Make judicious use of color in your scatterplots
  • (C) Show box plots (univariate summaries)
  • (D) Show causality, mechanism, explanation

A

Admin • 833.24K Points
Coach

Q. How do you select columns from a dplyr data frame where the column names start with the letter 'a'?

  • (A) select_cols(starts_with("a"))
  • (B) choose_columns(matches("a"))
  • (C) select(starts_with("a"))
  • (D) pick_cols(matches("a"))

A

Admin • 833.24K Points
Coach

Q. How do you perform a group-wise summary operation using dplyr's group_by() and summarize() functions?

  • (A) group_by_summary()
  • (B) group_summary()
  • (C) summarize_group()
  • (D) summarize()

A

Admin • 833.24K Points
Coach

Q. How do you join two data frames based on a common column using dplyr's left_join()?

  • (A) merge_left()
  • (B) left_merge()
  • (C) left_join()
  • (D) combine_left()

A

Admin • 833.24K Points
Coach

Q. If Linear regression model perfectly first i.e., train error is zero, then . . . . . . . .

  • (A) Test error is also always zero
  • (B) Test error is non zero
  • (C) Couldn't comment on Test error
  • (D) Test error is equal to Train error

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ