Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Directions: For each homework assignment, submit one .pdf file with two components: 1. The direct numerical or written answer of the questions. No codes included.
Directions: For each homework assignment, submit one .pdf file with two components: 1. The direct numerical or written answer of the questions. No codes included. 2. A R script (.R file) converted to .pdf with all the code you have used for the assignment. Use comments to mark the question number and comments. 3. Merge these two parts together in a single file. 1. Read Sections 3.1 through 3.3 in the R for Data Science text on Data Visualization here: http://r4ds.had.co.nz/data-visualisation.html then finish the exercise parts 3.2.4 and 3.3.1. 2. "birth.txt" is a data set on Canvas. Use "read.table()" function to read the data into R. Last time we used the base Rpackage to draw graphs. In this assignment, draw everything based on "ggplot2". (a) Draw the histogram of "Wgt" with density curve. Fill the bars with a color of your choice and the density curve with a color of your choice. (b) Draw a bar plot with a color scheme of your choice for "Smoke". (c) Draw a scatter plot of X=Gest and Y=Weight, with the color and shape of the points depending on "Smoke". Add a smooth line to the graph. (d) (Bonus 2 pts) Draw a side by side boxplot with one box is the "Wgt" for group Smoke Yes and the other box is the "Wgt" for group SmokeNo. Directions: For each homework assignment, submit one .pdf file with two components: 1. The direct numerical or written answer of the questions. No codes included. 2. A R script (.R file) converted to .pdf with all the code you have used for the assignment. Use comments to mark the question number and comments. 3. Merge these two parts together in a single file. 1. Read Sections 3.1 through 3.3 in the R for Data Science text on Data Visualization here: http://r4ds.had.co.nz/data-visualisation.html then finish the exercise parts 3.2.4 and 3.3.1. 2. "birth.txt" is a data set on Canvas. Use "read.table()" function to read the data into R. Last time we used the base Rpackage to draw graphs. In this assignment, draw everything based on "ggplot2". (a) Draw the histogram of "Wgt" with density curve. Fill the bars with a color of your choice and the density curve with a color of your choice. (b) Draw a bar plot with a color scheme of your choice for "Smoke". (c) Draw a scatter plot of X=Gest and Y=Weight, with the color and shape of the points depending on "Smoke". Add a smooth line to the graph. (d) (Bonus 2 pts) Draw a side by side boxplot with one box is the "Wgt" for group Smoke Yes and the other box is the "Wgt" for group SmokeNo
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started