Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using R studio Assume that the objects/variables/datasets have been created, rea

ID: 3180773 • Letter: U

Question

Using R studio

Assume that the objects/variables/datasets have been created, read the following code line and answer the questions.

Note: Case sensitive (CS) not case sensitive (nCS)

barplot(country,years,main="Life expectancy",xlab="Country",ylab="Years")

a) What type of plot would you get? (nCS)

b) What is the name of the variable or object to be plotted on the x axis? (CS)

c) What is the title of your plot? (CS)

d) What is the legend of the x axis? (CS)

e) What is the legend of the y axis? (CS)

Explanation / Answer

a, The above command gives a BARPLOT.

b, The variable that is plotted on x axis is country.

c,The title if the plot is "Life Expectancy".

d, Here, there is no legend given to x and y axis. To give legend the argument used is legend.text

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote