Question: Week 2 R Exercises INSERT YOUR NAME HERE! Below are questions to answer using R , based on the documents you just read. Enter your

Week 2 R Exercises
INSERT YOUR NAME HERE!
Below are questions to answer using R, based on the documents you just read. Enter your answers in the
Rmd file, using the space provided below each question! When you are done, you should be able to click the
Knit button and see a pretty version of your assignment.
Answer the following questions using the cdc data that we used in the Intro to Data document.
1. If you run the command below, you will see a graph of peoples weights (x-axis) versus their desired
weights (y-axis). Describe the relationship between these two variables.
ENTER TEXT FOR YOUR ANSWER HERE.
## run this command:
plot(cdc$weight, cdc$wtdesire, xlab="Weight", ylab="Desired weight")
2. Lets consider a new variable: the difference between desired weight (wtdesire) and current weight
(weight). Create this new variable by subtracting the two columns in the data frame and assigning
them to a new object called wdiff.
ENTER TEXT FOR YOUR ANSWER HERE.
# ENTER YOUR R COMMAND(S) HERE
# (YOU CAN ADD LINES IF NEEDED)
3. What type of data is wdiff? If an observation wdiff is 0, what does this mean about the persons
weight and desired weight. What if wdiff is positive or negative?
ENTER TEXT FOR YOUR ANSWER HERE.
# ENTER YOUR R COMMAND(S) HERE
# (YOU CAN ADD LINES IF NEEDED)
4. Describe the wdiff variable, using commands from the Intro to Data document. What does this tell
us about how people feel about their current weight?
ENTER TEXT FOR YOUR ANSWER HERE.
# ENTER YOUR R COMMAND(S) HERE
# (YOU CAN ADD LINES IF NEEDED)
5. Using numerical summaries and a side-by-side box plot, determine if men tend to view their weight
differently than women.
ENTER TEXT FOR YOUR ANSWER HERE.
# ENTER YOUR R COMMAND(S) HERE
# (YOU CAN ADD LINES IF NEEDED)
6. Now its time to get creative. Find the mean and standard deviation of weight and determine what
percentage of the weights are within one standard deviation o

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!