3  InClass2

Author

Özgenur Şensoy

Published

November 9, 2023

3.0.1 Air Quality

library(dplyr)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
library(ggplot2)
ggplot(airquality, aes(x = Wind, y = Ozone, color = factor(Month))) +
  geom_point(size = 3) +
  labs(title = "Scatter Plot of Wind Speed vs. Ozone Concentration by Month",
       x = "Wind Speed",
       y = "Ozone Concentration",
       color = "Month") +
  theme_minimal()
Warning: Removed 37 rows containing missing values (`geom_point()`).

ggplot(airquality, aes(x = factor(Month), y = Ozone, fill = factor(Month))) +
  geom_bar(stat = "summary", fun = "mean", position = "dodge", color = "black") +
  labs(title = "Average Ozone Concentration by Month",
       x = "Month",
       y = "Average Ozone Concentration") +
  theme_minimal()
Warning: Removed 37 rows containing non-finite values (`stat_summary()`).