R Programming Language Multiple Choice Questions on “ggplot2 ”.
1. _______ grammar makes a clear distinction between your data and what gets displayed on the screen or page.
a) ggplot1
b) ggplot2
c) d3.js
d) ggplot3
Answer: b
Clarification: The emphasis in ggplot2 is reducing the amount of thinking time by making it easier to go from the plot in your brain to the plot on the page.
2. Point out the wrong statement?
a) mean_se is used to calculate mean and standard errors on either side
b) hmisc wraps up a selection of summary functions from Hmisc to make it easy to use
c) plot is used to create a scatterplot matrix (experimental)
d) translate_qplot_base is used for translating between qplot and base graphics
Answer: c
Clarification: plotmatrix is used to create a scatterplot matrix (experimental).
3. Which of the following cuts numeric vector into intervals of equal length?
a) cut_interval
b) cut_time
c) cut_number
d) cut_date
Answer: a
Clarification: cut_number cuts numeric vector into intervals containing equal number of points.
4. Which of the following is a plot to investigate the order in which observations were recorded?
a) ggplot
b) ggsave
c) ggpcp
d) ggorder
Answer: d
Clarification: ggsave save a ggplot with sensible defaults.
5. Point out the wrong statement?
a) theme_minimal is minimalistic theme with no background annotations
b) theme_color is classic-looking theme, with x and y axis lines and no gridlines
c) theme_classic is a classic-looking theme
d) translate_qplot_base is used for translating between qplot and base graphics
Answer: b
Clarification: theme_classic is a classic-looking theme, with x and y axis lines and no gridlines.
6. ________ is used for translating between qplot and base graphics.
a) translate_qplot_base
b) translate_qplot_gpl
c) translate_qplot_lattice
d) translate_qplot_ggplot
Answer: a
Clarification: translate_qplot_gpl is used for translating between qplot and Graphics Production Library (GPL).
7. __________ modifies geom/stat aesthetic defaults for future plots.
a) translate_qplot_base
b) translate_qplot_gpl
c) translate_qplot_defaults
d) translate_qplot_ggplot
Answer: c
Clarification: translate_qplot_gpl is used for translating between qplot and Graphics Production Library (GPL).
8. Which of the following is discrete state calculator?
a) discrete_scale
b) ggpcp
c) ggfluctuation
d) ggmissing
Answer: c
Clarification: ggpcp is used to create a parallel coordinate plot.
9. Which of the following creates fluctuation plot?
a) ggmissplot
b) ggmissing
c) ggfluctuation
d) ggpcp
Answer: b
Clarification: Fluctuations are used to detect outliers.
10. ________ is used to create a plot to illustrate patterns of missing values.
a) ggmissplot
b) ggmissing
c) ggfluctuation
d) ggpcp
Answer: b
Clarification: The missing values plot is a useful tool to get a rapid overview of the number and pattern of missing values in a dataset.