R Programming Questions and Answers – Exploratory Data Analysis – 1

This set of R Programming Language Multiple Choice Questions & Answers (MCQs) focuses on “Exploratory Data Analysis – 1”.

1. 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
View Answer

Answer: d
Explanation: Only do what your tools allow you to do.

2. 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
View Answer

Answer: b
Explanation: EDA is used to summarize main characteristic of data.

3. 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
View Answer

Answer: c
Explanation: Functions like ‘plot’ or ‘hist’ typically create the plot on the graphics device and functions like ‘lines’, ‘text’, or ‘points’ will annotate or add data
to the plot.

advertisement
advertisement

4. Which of the following is an example of a valid graphics device in R?
a) A socket connection
b) A Microsoft Word document
c) A PDF file
d) A file folder
View Answer

Answer: c
Explanation: PNG file is also valid graphics device.

5. Which of the following is an example of a vector graphics device in R?
a) JPEG
b) PNG
c) GIF
d) SVG
View Answer

Answer: d
Explanation: SVG stands for scalable vector graphics.

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. 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
View Answer

Answer: d
Explanation: Scatterplots would be used frequently for particular dimension.

7. Which of the following functions is typically used to add elements to a plot in the base graphics system?
a) lines()
b) hist()
c) plot()
d) boxplot()
View Answer

Answer: d
Explanation: text() also can be used to add elements to a plot. boxplot() used to add elements to a plot in the base graphics system.

advertisement

8. Which function opens the screen graphics device for the Mac?
a) bitmap()
b) quartz()
c) pdf()
d) png()
View Answer

Answer: b
Explanation: quartz starts a graphics device driver for the Mac.

9. 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
View Answer

Answer: d
Explanation: R makes it easy to combine multiple plots into one overall graph, using either the par ( ) or layout( ) function.

advertisement

10. 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()
View Answer

Answer: a
Explanation: With the par( ) function, you can include the option mfrow=c(nrows, ncols) to create a matrix of nrows x ncols plots that are filled in by row.

Sanfoundry Global Education & Learning Series – R Programming Language.

Here’s the list of Best Books in R Programming Language.

To practice all areas of R Programming Language, Here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.