Exercise 1: Filtering a DataFrame

Using the mtcars dataset, create a new DataFrame that only includes rows where the number of cylinders is greater than 4 and the horsepower is greater than 150.

Exercise 2: Grouping and Summarizing

Using the iris dataset, group the data by species and calculate the mean sepal length for each species.

Exercise 3: Creating a Bar Plot

Using the ggplot2 package, create a bar plot of the number of cylinders in the mtcars dataset.

Exercise 4: Merging DataFrames

Using the dplyr package, merge the mtcars dataset with a new DataFrame that contains the country of origin for each car model.

Exercise 5: Creating a Scatter Plot

Using the ggplot2 package, create a scatter plot of the relationship between horsepower and miles per gallon in the mtcars dataset.

LS0tCnRpdGxlOiAiRXhlcmNpc2VzIG9uIERhdGFGcmFtZXMiCmF1dGhvcjogIk5heWVsIEJldHRhY2hlIgpkYXRlOiAiYHIgU3lzLkRhdGUoKWAiCm91dHB1dDogaHRtbF9ub3RlYm9vawotLS0KCiMgRXhlcmNpc2UgMTogRmlsdGVyaW5nIGEgRGF0YUZyYW1lCgpVc2luZyB0aGUgYG10Y2Fyc2AgZGF0YXNldCwgY3JlYXRlIGEgbmV3IERhdGFGcmFtZSB0aGF0IG9ubHkgaW5jbHVkZXMgcm93cyB3aGVyZSB0aGUgbnVtYmVyIG9mIGN5bGluZGVycyBpcyBncmVhdGVyIHRoYW4gNCBhbmQgdGhlIGhvcnNlcG93ZXIgaXMgZ3JlYXRlciB0aGFuIDE1MC4KCiMgRXhlcmNpc2UgMjogR3JvdXBpbmcgYW5kIFN1bW1hcml6aW5nCgpVc2luZyB0aGUgaXJpcyBkYXRhc2V0LCBncm91cCB0aGUgZGF0YSBieSBzcGVjaWVzIGFuZCBjYWxjdWxhdGUgdGhlIG1lYW4gc2VwYWwgbGVuZ3RoIGZvciBlYWNoIHNwZWNpZXMuCgojIEV4ZXJjaXNlIDM6IENyZWF0aW5nIGEgQmFyIFBsb3QKClVzaW5nIHRoZSBnZ3Bsb3QyIHBhY2thZ2UsIGNyZWF0ZSBhIGJhciBwbG90IG9mIHRoZSBudW1iZXIgb2YgY3lsaW5kZXJ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