The Final Exam 2/2 will be held on March 14, 2025, from 8:00 to 11:00 AM at the ICDI building. Total Score: 15% of 100% - 5%: Multiple-choice questions. - 10%: Answering questions, editing, or showing the code based on the given results. You are allowed to use your computer/iPad/Tablet to run the R program. However, you are not allowed to use the internet to search for solutions via search engines (e.g., Google) or generative AI (e.g., ChatGPT). You are not allowed to discuss anything in the testing room. You are allowed to bring and write notes on one A4 page (both sides).
Multiple Choices: ggplot2(Bar Plot)
Which of the following code snippets correctly creates a bar plot for the variable Species in the iris dataset?
What argument in geom_bar() is used to create a bar plot with bars filled by a variable such as Species?
If you want to display the count of each category on top of each bar in a bar plot, which function should you use?
To reorder bars based on the mean value of another variable (e.g., Sepal.Width for each Species), which function can be used within aes()?
Which of the following will add a color outline around each bar in the bar plot?
What does the position = "dodge" argument in geom_bar() do in a grouped bar plot?
Which of the following code snippets creates a horizontal bar plot for the variable Species in the iris dataset?
To display bars with a frequency count instead of raw counts, you should set the y aesthetic in aes() to which of the following?
Which of the following will set the bar color for each level of Species using a color palette in a ggplot2 bar plot?
To add labels at the top of each bar, which combination of geom_bar() and geom_text() will work correctly?
Which function is used to add a title to the bar plot?
How would you customize a bar plot to have bars with transparency using the alpha parameter?
What function is used to change the bar colors manually in a bar plot?
Which of the following would create a stacked bar plot with bars divided by a variable Type?
To create a proportional stacked bar plot, what should you set position to in geom_bar()?
Which argument should be modified to adjust the width of the bars in a ggplot2 bar plot?
To remove the legend from a ggplot2 bar plot, which function should be used?
If you want the bars ordered by frequency, which function should you use on the variable within aes()?
Which function would you use to change the axis labels of a ggplot2 bar plot?
Which of the following codes would change the color palette of a bar plot for a categorical variable Species to the "viridis" palette?
How can you add a customized legend title for the fill aesthetic in a ggplot2 bar plot?
If you want to change the color of the text labels on the x-axis, which code should you use?
How would you display the bars in decreasing order of frequency for a categorical variable, Category?
Which of the following arguments would be used to remove grid lines in a bar plot?
To display the count values on top of each bar with a font size of 5, which code should you use?
If you want to create a bar plot with custom bar widths for each category in Category, which argument will allow you to adjust the width of all bars simultaneously?
Which function would you use to add custom x-axis and y-axis limits to a ggplot2 bar plot?
To rotate x-axis text labels by 45 degrees, which code should be used?
Which of the following ggplot2 themes provides a minimalistic look with no background color?
To change the spacing between bars in a dodged bar plot, which of the following arguments is required?