Explore topic-wise MCQs in R Programming.

This section includes 7 Mcqs, each offering curated multiple-choice questions to sharpen your R Programming knowledge and support exam preparation. Choose a topic below to get started.

1.

If I want to save a plot to a PDF file, which of the following is a correct way of doing that?

A. Construct the plot on the screen device and then copy it to a PDF file with dev.copy2pdf()
B. Construct the plot on the PNG device with png(), then copy it to a PDF with dev.copy2pdf()
C. Open the PostScript device with postscript(), construct the plot, then close the device with dev.off()
D. Open the screen device with quartz(), construct the plot, and then close the device with dev.off()
Answer» B. Construct the plot on the PNG device with png(), then copy it to a PDF with dev.copy2pdf()
2.

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
Answer» E.
3.

Which function opens the screen graphics device for the Mac?

A. bitmap()
B. quartz()
C. pdf()
D. png()
Answer» C. pdf()
4.

Bitmapped file formats can be most useful for ____________

A. Plots that may need to be resized
B. Plots that require animation or interactivity
C. Plots that are not scaled to a specific resolution
D. Scatterplots with many many points
Answer» E.
5.

Which of the following is an example of a vector graphics device in R?

A. JPEG
B. PNG
C. GIF
D. SVG
Answer» E.
6.

Which of the following is true about the base plotting system?

A. Margins and spacings are adjusted automatically depending on the type of plot and the data
B. Plots are typically created with a single function call
C. Plots are created and annotated with separate functions
D. The system is most useful for conditioning plots
Answer» D. The system is most useful for conditioning plots
7.

What is the role of exploratory graphs in data analysis?

A. They are made for formal presentations
B. They are typically made very quickly
C. Axes, legends, and other details are clean and exactly detailed
D. They are used in place of formal modeling
Answer» C. Axes, legends, and other details are clean and exactly detailed