
### PRACTICE 1:

Using the iris dataset, create a scatter plot ( geom_point() ) of Petal.Length (x variable) vs Sepal.length (y variable)

```{r}
head(iris) #inspecting the data 

#Answer: 
ggplot(aes(x = Petal.Length, y = Sepal.Length), data = iris) + 
geom_point()

```


#PRACTICE 2:


Using the countries dataset, plot gdpPercap (gdp per capita, x variable) vs lifeExp (life expectancy). Add a linear trendline to the plot.

```{r}
ggplot(aes(x=gdpPercap, y=lifeExp), data = countries)+
  geom_point(aes(col = year)) +
  geom_smooth(method = 'lm', se = FALSE, col = 'grey25') +
  labs(x = 'GDP per capita ($)', y = 'life expectancy (yrs)')+ 
  theme_bw()
```


