R Programming Questions and Answers – Exploratory Data Analysis – 2

This set of Advanced R Programming Questions & Answers focuses on “Exploratory Data Analysis – 2”.

1. __________ produces box-and-whisker plots.
a) xyplot
b) dotplot
c) barchart
d) bwplot
View Answer

Answer: d
Explanation: Bwplot plots a series of vertical box-and-whisker plots where the individual boxplots represent the data subdivided by the value of some factor. Optionally the y-axis may be scaled logarithmically. Dotplot produces Cleveland dot plots. Barchart produces bar plots.

2. __________ produces bivariate scatterplots or time-series plots.
a) xyplot
b) dotplot
c) barchart
d) bwplot
View Answer

Answer: a
Explanation: xyplot has points that show the relationship between two sets of data. Optionally the y-axis may be scaled logarithmically. dotplot produces Cleveland dot plots. barchart produces bar plots.

3. Annotation of plots in any plotting system involves adding points, lines, or text to the plot, in addition to customizing axis labels or adding titles. Different plotting systems have different sets of functions for annotating plots in this way. Which of the following functions can be used to annotate the panels in a multi-panel lattice plot?
a) points()
b) panel.abline()
c) lines()
d) axis()
View Answer

Answer: b
Explanation: panel.abline() is one of the most used panel function.

advertisement
advertisement

4. ____________ produces one-dimensional scatterplots.
a) xyplot
b) stripplot
c) barchart
d) bwplot
View Answer

Answer: b
Explanation: This function along with other high-level Lattice functions, respond to a common set of arguments.

5. which of the following functions can be used to finely control the appearance of all lattice plots ?
a) par()
b) print.trellis()
c) splom()
d) trellis.par.set()
View Answer

Answer: d
Explanation: All high-level function in lattice are generic.

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

6. What is ggplot2 an implementation of?
a) the Grammar of Graphics developed by Leland Wilkinson
b) 3D visualization system
c) the S language originally developed by Bell Labs
d) the base plotting system in R
View Answer

Answer: a
Explanation: The ggplot2 package, created by Hadley Wickham, offers a powerful graphics language for creating elegant and complex plots.

7. For barchart and _________ non-trivial methods exist for tables and arrays, documented at barchart.table.
a) scatterplot
b) dotplot
c) xyplot
d) scatterplot & xyplot
View Answer

Answer: b
Explanation: The numeric methods are equivalent to a call with no left hand side and no conditioning variables in the formula.

advertisement

8. What is a geom in the ggplot2 system?
a) a plotting object like point, line, or other shape
b) a method for making conditioning plots
c) a method for mapping data to attributes like color and size
d) a statistical transformation
View Answer

Answer: a
Explanation: The bar geom is used to produce 1d area plots.

9. Logical flag is applicable to which of the following plots?
a) scatterplot
b) dotplot
c) xyplot
d) zyplot
View Answer

Answer: b
Explanation: Logical flag applicable to bwplot, dotplot, barchart, and stripplot.

advertisement

10. ___________ is used to determine what is plotted for each group.
a) panel.expose
b) panel.impose
c) panel.superpose
d) panel.depose
View Answer

Answer: c
Explanation: panel.superpose can be combined with different panel.groups functions.

Sanfoundry Global Education & Learning Series – R Programming Language.

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

To practice advanced questions on all areas of R Programming, 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.