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. 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?

 
 
 
 

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

 
 
 
 

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

 
 
 
 

4. Debugging is the process of

 
 
 
 

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

 
 
 
 

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

 
 
 
 

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

 
 
 
 

8. What does the profvis( ) function do?

 
 
 
 

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

 
 
 
 

10. 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?

 
 
 
 

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

 
 
 
 

12. 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?

 

 
 
 
 

13. What does the traceback( ) function do?

 
 
 
 

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

 
 
 
 

15. What is the microbenchmark package useful for?

 
 
 
 

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

 
 
 
 

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

 

 
 
 
 

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

 
 
 
 

19. What does the Rprof( ) function do?

 
 
 
 

20. 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?

 
 
 
 


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

Discover more from R Frequently Asked Questions

Subscribe now to keep reading and get access to the full archive.

Continue reading

x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security