Create a scatter plot of the relationship between horsepower (horizontal axis) and miles per gallon (vertical axis).

Words: 318
Pages: 2
Subject: Uncategorized

Instructions.
• Use R Markdown to create a PDF document with the two tasks.

• As always, any plots should have appropriate axis and overall labels.

1. There is a data set in R called mt cars.
(a) Is mt cars a data frame or a matrix? If it is not a data frame, make it one using data.frame().
(b) Access the help file on mt cars and summarize the brief description of the data set.
(c) Of the variables in mt cars all are of class numeric. That said, are there any that it would make sense to call categorical? Which ones and why?

2. Create a scatter plot of the relationship between horsepower (horizontal axis) and miles per gallon (vertical axis). Add a linear regression line to the plot and describe the relationship in words in context. Do this in both base R and ggplot2.
(a) Make a conditional violin plot with superimposed box plots in ggplot2 of miles per gallon conditional on transition type (automatic or not). Interpret the plot in context.
(b) Use factor() to add factor versions of the variables gear and cyl. Create dodged and stacked bar charts in ggplot2. For your stacked bar charts, look up how to normalize the bars so that they equal 100% and do that. Interpret the results in context.
(c) Use mt cars data to create a scatter plot that pulls in multivariate information like we did with the state abbreviations and regions in class. Surprise me.

Let Us write for you! We offer custom paper writing services Order Now.

REVIEWS


Criminology Order #: 564575

“ This is exactly what I needed . Thank you so much.”

Joanna David.


Communications and Media Order #: 564566
"Great job, completed quicker than expected. Thank you very much!"

Peggy Smith.

Art Order #: 563708
Thanks a million to the great team.

Harrison James.


"Very efficient definitely recommend this site for help getting your assignments to help"

Hannah Seven