πŸ“Š R Programming
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) To check a single condition and execute different code based on the result
πŸ“Š R Programming
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) the plotting symbol/character in the base graphics system
πŸ“Š R Programming
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) Show causality, mechanism, explanation
πŸ“Š R Programming
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"))
πŸ’¬ Discuss
βœ… Correct Answer: (C) select(starts_with("a"))
πŸ“Š R Programming
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()
πŸ’¬ Discuss
βœ… Correct Answer: (D) summarize()
πŸ“Š R Programming
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()
πŸ’¬ Discuss
βœ… Correct Answer: (C) left_join()
πŸ“Š R Programming
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
πŸ’¬ Discuss
βœ… Correct Answer: (C) Couldn't comment on Test error
πŸ“Š R Programming
Q. Predicting y for a value of x that's outside the range of values we actually saw for x in the original data is called . . . . . . . .
  • (A) Regression
  • (B) Extrapolation
  • (C) Intra polation
  • (D) Polation
πŸ’¬ Discuss
βœ… Correct Answer: (B) Extrapolation
πŸ“Š R Programming
Q. If you have an existing package that doesn't have an .Rproj file, you can use devtools for the use_rstudio(". . . . . . . ./to/package") to add it.
  • (A) Path
  • (B) Package
  • (C) Function
  • (D) Class
πŸ’¬ Discuss
βœ… Correct Answer: (A) Path
πŸ“Š R Programming
Q. A bundled package is a package that's been compressed into a . . . . . . . . file.
  • (A) Double
  • (B) Triple
  • (C) Single
  • (D) No file
πŸ’¬ Discuss
βœ… Correct Answer: (C) Single