Explore the mtcars dataset (which is already included in R). Copy the mtcars dataset into a new variable (called it myCars), so that if you mess up, you can start again very easily (by copying mtcars into myCars again).

Step 1: What is the hp (hp stands for “horse power”)

# 1 What is the highest hp?

# 2 Which car has the highest hp?

Step 2: Explore mpg (mpg stands for “miles per gallon”)

# 3 What is the highest mpg?
# 4 Which car has the highest mpg? 
# 5 Create a sorted dataframe, based on mpg

Step 3: Which car has the “best” combination of mpg and hp?

  1. What logic did you use? Note: No code is needed here just write what you would do.

  2. Which car?

Step 4: Which car has “best”" car combination of mpg and hp, where mpg and hp must be given equal weight? Note: This requires code.

LS0tCnRpdGxlOiAiSG9tZXdvcmsgMjogTWFuaXB1bGF0aW5nIGRhdGEgZnJhbWVzIgphdXRob3I6IAotIEF1dGhvcjEKZGF0ZTogImByIFN5cy50aW1lKClgIgpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKLS0tCgoKRXhwbG9yZSB0aGUgbXRjYXJzIGRhdGFzZXQgKHdoaWNoIGlzIGFscmVhZHkgaW5jbHVkZWQgaW4gUikuIENvcHkgdGhlIG10Y2FycyBkYXRhc2V0IGludG8gYSBuZXcgdmFyaWFibGUgKGNhbGxlZCBpdCBteUNhcnMpLCBzbyB0aGF0IGlmIHlvdSBtZXNzIHVwLCB5b3UgY2FuIHN0YXJ0IGFnYWluIHZlcnkgZWFzaWx5IChieSBjb3B5aW5nIG10Y2FycyBpbnRvIG15Q2FycyBhZ2FpbikuCgojIyMgU3RlcCAxOiBXaGF0IGlzIHRoZSBocCAoaHAgc3RhbmRzIGZvciDigJxob3JzZSBwb3dlcuKAnSkKYGBge3IgU3RlcDEsIGVjaG89VFJVRX0KIyAxIFdoYXQgaXMgdGhlIGhpZ2hlc3QgaHA/CgojIDIgV2hpY2ggY2FyIGhhcyB0aGUgaGlnaGVzdCBocD8KCmBgYAoKIyMjIFN0ZXAgMjogRXhwbG9yZSBtcGcgKG1wZyBzdGFuZHMgZm9yIOKAnG1pbGVzIHBlciBnYWxsb27igJ0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