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

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

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()

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

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

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()

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

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

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

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

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

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

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

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.