Warning Midterm Exam (Part 2 of 2) on Jan 9, 2025, 3:30–5:30 PM. at RB3208 Total Score: 15% (5% Multiple Choice, 10% Writing R Code). Topics: - Data Structure: Data Frame - Data Wrangling - Data Structure: XTS Project 1: 10% Create your CV using Quarto and upload the HTML and related files to CMU’s personal web hosting. 1. Submit your HTML file to your CMU personal web hosting. 2. Zip your project folder. The zip file should include the .qmd file, any image files, and CSS files (if used). I will render your files to compare them with your URL. Send your URL and the zip file to my email: somsak.c@icdi.cmu.ac.th before midnight on January 5, 2025. Content Requirements: Your CV must include: - Your picture - Your birthday - Your education - Your hobbies - Links to at least 2 social media platforms - Your future plans Criteria: 1. The HTML file and .qmd file must match. 2. Use a theme. 3. Use CSS. 4. Include a table. 5. Include a tabset 6. Include a video. 5. Use icons from Font Awesome (e.g., Facebook, YouTube, LINE, WeChat, etc.). 8. Modify the layout creatively.
Additional Note: Some of your score will be determined by votes from your peers.
Multiple Choices: ggplot2(Scatter Plot)
Which of the following code snippets correctly creates a scatter plot with Sepal.Length on the x-axis and Sepal.Width on the y-axis from the iris dataset? ::: {.cell}
To color points in a scatter plot by the Species variable in the iris dataset, which code should you use? ::: {.cell}
:::
How would you set the size of all points in a scatter plot to 3? ::: {.cell}
:::
Which argument in geom_point() can be used to make the points semi-transparent? ::: {.cell}
:::
To add a regression line to a scatter plot, which layer should you add to geom_point()? ::: {.cell}
:::
If you want to limit the x-axis in a scatter plot to a range between 4 and 8, which code should you use? ::: {.cell}
:::
Which of the following would change the shape of points in a scatter plot? ::: {.cell}
:::
To display both color and size based on the variable Petal.Length, which code should you use in a scatter plot? ::: {.cell}
:::
Which function is used to add custom axis labels to a scatter plot? ::: {.cell}
:::
To add a title to the scatter plot, which function should be used? ::: {.cell}
:::
Which of the following code snippets would set the color of all points in the scatter plot to blue? ::: {.cell}
:::
To plot points with jitter (slight random noise to reduce overlap), which function should you use? ::: {.cell}
:::
Which function allows you to change the x-axis and y-axis scales to logarithmic in a scatter plot? ::: {.cell}
:::
If you want to add labels to each point in a scatter plot using the Species variable, which function should you add? ::: {.cell}
:::
To control the color gradient of points based on a continuous variable (e.g., Petal.Width), which function should you use? ::: {.cell}
:::
To apply a custom theme with a dark background and white grid lines, which theme function should you use? ::: {.cell}
:::
How would you add a legend title for the color aesthetic? ::: {.cell}
:::
If you want to highlight certain points with a specific color, which of the following code snippets would accomplish this if the highlight variable indicates points to be highlighted? ::: {.cell}
:::
To adjust the space between axis ticks and labels, which function should you modify? ::: {.cell}
:::
Which code snippet would set both the x-axis and y-axis limits to range between 0 and 10? ::: {.cell}
:::
How would you add a 95% confidence interval to a regression line in a scatter plot? ::: {.cell}
:::
To vary point size based on the values of a continuous variable Weight, which of the following code snippets is correct? ::: {.cell}
:::
Which function allows you to save a ggplot scatter plot as an image file? ::: {.cell}
:::
To add a caption below a scatter plot, which of the following should you use? ::: {.cell}
:::
Which code snippet allows you to change both the x-axis and y-axis labels’ font size to 14? ::: {.cell}
:::
To create a facet grid of scatter plots based on two categorical variables, Type and Category, which function should be used? ::: {.cell}
:::
If you want to adjust the transparency of the confidence interval around a geom_smooth() line, which argument should you modify? ::: {.cell}
:::
To display a smooth line but without the points in a scatter plot, which of the following codes should you use? ::: {.cell}
:::
Which function would you use to apply a color scale for a continuous variable, Petal.Length, using the viridis palette? ::: {.cell}
:::
To create a scatter plot with a background panel color of light gray, which code would be appropriate? ::: {.cell}