0
0
R Programmingprogramming~5 mins

Labels and titles in R Programming - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What function in R is used to add a main title to a plot?
The title() function is used to add a main title to a plot in R.
Click to reveal answer
beginner
How do you add labels to the x-axis and y-axis in an R plot?
You can add labels to the x-axis and y-axis using the xlab and ylab arguments inside the plot() function or by using the title() function with xlab and ylab arguments.
Click to reveal answer
beginner
What argument inside the plot() function controls the main title?
The main argument inside plot() controls the main title of the plot.
Click to reveal answer
intermediate
How can you add a subtitle to a plot in R?
You can add a subtitle using the sub argument inside the plot() function or by calling title(sub = "Your subtitle") after the plot.
Click to reveal answer
beginner
What is the difference between main and sub in R plotting?
main sets the main title at the top of the plot, while sub sets a subtitle below the plot.
Click to reveal answer
Which argument adds a main title directly inside the plot() function?
Amain
Btitle
Clabel
Dcaption
How do you add a label to the x-axis in a plot?
AUse <code>xlab</code> argument
BUse <code>ylab</code> argument
CUse <code>main</code> argument
DUse <code>sub</code> argument
Which function can add a title after a plot is created?
Alabel()
Bplot()
Ctitle()
Daxis()
What does the sub argument do in R plotting?
AAdds a main title
BAdds a subtitle below the plot
CLabels the y-axis
DLabels the x-axis
If you want to label the y-axis, which argument do you use?
Asub
Bxlab
Cmain
Dylab
Explain how to add a main title, x-axis label, and y-axis label to a plot in R.
Think about the arguments inside the plot() function.
You got /4 concepts.
    Describe the difference between the 'main' and 'sub' arguments in R plotting.
    Consider where the text appears on the plot.
    You got /3 concepts.