Using R Studio: 1)Use the `mtcars` data (`data(mtcars)`) to answer these questions: a) Which rows...

60.1K

Verified Solution

Question

Programming

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`).

Answer & Explanation Solved by verified expert
3.6 Ratings (364 Votes)
Question 1Below is the R code for the given problem Please followcommentsR Code Question 1 a    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students