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
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
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
Explanation: panel.abline() is one of the most used panel function.
4. ____________ produces one-dimensional scatterplots.
a) xyplot
b) stripplot
c) barchart
d) bwplot
View Answer
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
Explanation: All high-level function in lattice are generic.
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
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
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
View Answer
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
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
View Answer
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.
- Check R Programming Books
- Practice Programming MCQs
- Apply for Programming Internship
- Check Information Technology Books