4 | R: Graphics Flashcards
(POLL)
To create a bitmap graphics we can use the command (could be in exam!):
- pdf
- png
- save.image
- none-of-them
png
(save.image: does not create a picture but rather a workspace image!! )
(POLL)
To plot the distribution of a categorical variable
* assocplot
* barplot
* boxplot
* piechart
* xyplot
barplot, piechart
(assocplot is for two vars)
(POLL)
To visualize the distribution of a numerical variables we use the command:
* assocplot
* barplot
* hist
* pie
hist
(POLL)
To create a multifigure plot I can use the function …. (select two):
* figure
* layout
* mfcol
* mfrow
* par
(exam not so tricky questions)
layout, par
(mfcol and mfrow are arguments for par)
6
To display a mathematical function we use the ______ command.
curve()
To visualize the distribution of a numerical value we use the ______ function.
hist()
To visualize the distribution of a factor variable we use the ______ function together with the ______ function.
table(), barplot()
To compare two groups with regards to a numerical variable we use a ______ .
boxplot()
To visualise the Pearson residuals of a contingency table we use the ______ function or focus on the proportions in this table we use a ______ .
assocplot(), mosaicplot()
To display the relationship between two numerical variables we use a ______ .
(xy)plot()
7
Which of the below are low level commands that can be used to annotate an existing plot?
- points
- text
- axis
- hist
- boxplot
points (box), text, axis
8
To arrange plots which should take different sizes but should be shown together we use the _____ function with a _____ of integers.
layout(), matrix
To arrange plots with a regular layout of the same size we can use the _____ command together with the _____ option for instance
par(), mfrow