Quiz R Programming Debug 5

The post about “Quiz R Programming” covers different aspects of debugging a function’s execution. Let us start with the Quiz R Programming Debug.

MCQs about Debugging and Traceback in R Language

1. Which function is better for analyzing fast-running functions: profvis( ) or microbenchmark( )?

 
 
 
 

2. Which of the following files in R have names that follow widely accepted naming convention rules?

 
 
 
 

3. Where in RStudio can you find the export menu for saving plots?

 
 
 
 

4. You want to store a vector in a variable. What type of operator would you use to do this?

 

 
 
 
 

5. Which of the following functions initiates an interactive debugging environment that allows you to step through code one expression at a time?

 
 
 
 

6. Debugging is the process of

 
 
 
 

7. Which of the following functions allows you to temporarily insert pieces of code into other functions to modify their behavior?

 
 
 
 

8. A data analyst wants a high-level summary of the structure of their data frame, including the column names, the number of rows and variables, and the type of data within a given column. What function should they use?

 
 
 
 

9. You want to create functions, documentation, sample data sets, and code tests they can share and reuse in other projects. What should you create to help them accomplish this?

 

 
 
 
 

10. What does calling trace(“f”) for function “f( )” do

 
 
 
 

11. When should the traceback( ) function be called?

 
 
 
 

12. What is the microbenchmark package useful for?

 
 
 
 

13. What does the traceback( ) function do?

 
 
 
 

14. What is the name of the popular package archive dedicated to supporting R users’ authentic, validated code?

 
 
 
 

15. What does the Rprof( ) function do?

 
 
 
 

16. In R, what includes reusable functions and documentation about how to use the functions?

 
 
 
 

17. You are working with a large data frame. It contains so many columns that they don’t all fit on the screen simultaneously. You want a quick list of all the column names to understand better what is in their data. What function should they use?

 
 
 
 

18. What does the profvis( ) function do?

 
 
 
 

19. You are compiling an analysis of the average monthly costs for your company. What summary statistic function should you use to calculate the average?

 
 
 
 

20. You want to create a vector with the values 21, 12, 39, in that exact order. After specifying the variable, what R code chunk lets you create the vector?

 
 
 
 


Debugging is an essential skill in programming, including R programming. In R Programming Language, the debug() function allows the user to step through the function’s execution, line by line. At any point, we can print out values of variables or produce a graph of the results within the function.

MCQs Quiz R Programming Debug

Quiz R Programming

  • Debugging is the process of
  • Which of the following functions initiates an interactive debugging environment that allows you to step through code one expression at a time?
  • Which of the following functions allows you to temporarily insert pieces of code into other functions to modify their behavior?
  • What does the traceback( ) function do?
  • When should the traceback( ) function be called?
  • What does calling trace(“f”) for function “f( )” do
  • What is the microbenchmark package useful for?
  • What does the Rprof( ) function do?
  • What does the profvis( ) function do?
  • Which function is better for analyzing fast-running functions: profvis( ) or microbenchmark( )?
  • In R, what includes reusable functions and documentation about how to use the functions?
  • What is the name of the popular package archive dedicated to supporting R users’ authentic, validated code?
  • You want to create a vector with the values 21, 12, 39, in that exact order. After specifying the variable, what R code chunk lets you create the vector?
  • You are compiling an analysis of the average monthly costs for your company. What summary statistic function should you use to calculate the average?
  • You are working with a large data frame. It contains so many columns that they don’t all fit on the screen simultaneously. You want a quick list of all the column names to understand better what is in their data. What function should they use?
  • Where in RStudio can you find the export menu for saving plots?
  • Which of the following files in R have names that follow widely accepted naming convention rules?
  • You want to store a vector in a variable. What type of operator would you use to do this?  
  • You want to create functions, documentation, sample data sets, and code tests they can share and reuse in other projects. What should you create to help them accomplish this?  
  • A data analyst wants a high-level summary of the structure of their data frame, including the column names, the number of rows and variables, and the type of data within a given column. What function should they use?

Statistics and Data Analysis

Online Quiz Website with Answers

Leave a Reply