Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using R Studio: 1)Use the `mtcars` data (`data(mtcars)`) to answer these questions: a) Which rows of the data frame contain cars that weigh more than
Using R Studio: 1)Use the `mtcars` data (`data(mtcars)`) to answer these questions: a) Which rows of the data frame contain cars that weigh more than 4000 pounds (the variable is `wt`, units are 1000 pounds). b) Which cars are these? (*Hint:* since rows are named by car name, use `row.names()`). c) What is the mean displacement (in inches^3^ ) for cars with at least 200 horsepower (`hp`). d) Which car has the highest fuel economy (`mpg`)? e) What was the fuel economy for the Honda Civic? 2) Using the `mtcars` data create a new variable for horespower per unit weight (`hp/wt`). Is this a better predictor of acceleration (`qsec`; seconds to complete a quarter mile) than horsepower alone? 3) Use the function `subset()` to return the cars with 4 cyclinders and automatic transmissions (`am` = `0`). (*Hint:* see `?subset`).
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