1. Which function in R is used to create a basic plot?
A . graph()
B . createPlot()
C . plot()
D . draw()
2. To add a title to a plot, which function is used?
A . addTitle()
B . text()
C . title()
D . heading()
3. Which function is used to create a histogram in R?
A . hist()
B . plot()
C . chart()
D . diagram()
4. In R, which function is used to create a boxplot?
A . boxplot()
B . plotbox()
C . boxgraph()
D . plot()
5. The function to create a bar plot is:
A . bar()
B . barplot()
C . plotbar()
D . drawbar()
6. What argument is used to change color in a plot?
A . bg
B . col
C . color
D . clr
7. To save a plot as a PDF, which function is used?
A . pdf()
B . save()
C . export()
D . write()
8. Which function is used to save a plot as a JPEG file?
A . jpeg()
B . save()
C . writejpeg()
D . exportjpeg()
9. To create a 3D plot in R, we commonly use the package:
A . lattice
B . plot3D
C . ggplot2
D . dplyr
10. Which function from plot3D creates 3D scatter plots?
A . scatter3d()
B . plot3d()
C . points3D()
D . cloud()
11. What is the primary goal of debugging?
A . Make code faster
B . Fix errors
C . Save memory
D . Reduce syntax
12. Which type of error occurs due to mistakes in writing code?
A . Runtime error
B . Syntax error
C . Logical error
D . Output error
13. A runtime error occurs when:
A . Code is missing
B . Code violates rules during execution
C . Syntax is incorrect
D . File is not saved
14. Which R function is used to debug a function?
A . fix()
B . debug()
C . trace()
D . inspect()
15. Which function is used to remove debugging from a function?
A . undebug()
B . untrace()
C . clear()
D . nodebug()
16. What function is used to trace the execution of an R function?
A . debug()
B . trace()
C . inspect()
D . follow()
17. Which function allows you to browse inside a function during an error?
A . browse()
B . browser()
C . inspect()
D . open()
18. The R function to stop execution for debugging is:
A . stop()
B . halt()
C . browser()
D . debugstop()
19. What is GDB mainly used for in R debugging?
A . Visualize data
B . Graph plotting
C . Debugging compiled R code
D . Saving graphs
20. Syntax errors are generally caught during:
A . Execution
B . Compilation
C . Editing
D . Debugging
21. In which mode do you see step-by-step code execution?
A . Execution mode
B . Trace mode
C . Debugging mode
D . Browse mode
22. Which of these is NOT a debugging function in R?
A . debug()
B . undebug()
C . browser()
D . render()
23. Which command runs GDB on R itself?
A . run(R)
B . R -d gdb
C . gdb()
D . start(R)
24. Moving to higher-level debugging tools helps in:
A . Increasing errors
B . Reducing memory
C . More convenient debugging
D . Writing new code
25. If an error occurs while running a simulation, what is most important to check?
A . Graphs
B . Data types
C . Consistency of simulation steps
D . Plot labels
26. To find hidden errors in simulation code, you should:
A . Ignore warnings
B . Always recompile
C . Ensure consistency and debug
D . Save graphs
27. Which of the following can help to detect runtime errors?
A . print()
B . summary()
C . browser()
D . hist()
28. Which type of error is easiest to catch before running the code?
A . Syntax error
B . Runtime error
C . Logical error
D . Data error
29. Which is the default error handler function in R?
A . error()
B . stop()
C . traceback()
D . handler()
30. To view the sequence of function calls that led to an error, use:
A . viewerror()
B . traceback()
C . errorpath()
D . errortrace()
☞ R - Programming MCQs - Unit-1 - [ R-Programming ]
☞ R - Programming MCQs - Unit-2 - [ R-Programming ]
☞ R - Programming MCQs - Unit-3 - [ R-Programming ]
☞ R - Programming MCQs - Unit-4 - [ R-Programming ]
☞ R - Programming MCQs - Unit-5 - [ R-Programming ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-1 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-2 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-3 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-4 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-5 - [ FLAT ]
☞ Artificial Intelligence (AI) MCQs - Unit-1 - [ Artificial Intelligence ]
☞ Artificial Intelligence (AI) MCQs - Unit-2 - [ Artificial Intelligence ]
☞ Artificial Intelligence (AI) MCQs - Unit-3 - [ Artificial Intelligence ]
☞ Artificial Intelligence (AI) MCQs - Unit-4 - [ Artificial Intelligence ]
☞ Artificial Intelligence (AI) MCQs - Unit-5 - [ Artificial Intelligence ]
☞ PPS MCQs - Unit-1 - [ PPS ]
☞ PPS MCQs - Unit-2 - [ PPS ]
☞ PPS MCQs - Unit-3 - [ PPS ]
☞ PPS MCQs - Unit-4 - [ PPS ]
☞ PPS MCQs - Unit-5 - [ PPS ]
☞ Object Oriented Programming through Java MCQs - Unit-1 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-2 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-3 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-4 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-5 - [ OOP_JAVA ]
☞ Design and Analysis of Algorithms MCQs - Unit-1 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-2 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-3 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-4 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-5 - [ DAA ]
☞ Software Engineering MCQs - Unit-1 - [ SE ]
☞ Software Engineering MCQs - Unit-2 - [ SE ]
☞ Software Engineering MCQs - Unit-3 - [ SE ]
☞ Software Engineering MCQs - Unit-4 - [ SE ]
☞ Software Engineering MCQs - Unit-5 - [ SE ]
☞ Data Mining MCQs - Unit-1 - [ DM ]
☞ Data Mining MCQs - Unit-2 - [ DM ]
☞ Data Mining MCQs - Unit-3 - [ DM ]
☞ Data Mining MCQs - Unit-4 - [ DM ]
☞ Data Mining MCQs - Unit-5 - [ DM ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-1 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-2 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-3 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-4 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-5 - [ COA ]
☞ Data Structures Objective Type Question Bank-Unit-1 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-2 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-3 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-4 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-5 - [ DS ]
☞ Database Management System Objective Type Question Bank-Unit-1 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-2 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-3 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-4 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-5 - [ DBMS ]