Question
Write an R script with the following instructions: a. Airquality dataset in datasets package is a data frame containing daily air quality measurements in New
Write an R script with the following instructions:
a. Airquality dataset in datasets package is a data frame containing daily air quality measurements in New York, May to September 1973. Store the airquality dataset in an object named examData and print the rows for the first day of each month in examData. Your code should print: Ozone Solar.R Wind Temp Month Day 1 41 190 7.4 67 5 1 32 NA 286 8.6 78 6 1 62 135 269 4.1 84 7 1 93 39 83 6.9 81 8 1 124 96 167 6.9 91 9 1
b.Print the average Ozone value and maximum Solar.R value in examData. Note that some values are NA in this dataset. You should remove NA values in the computation. Your output should be 42.12931 for the average Ozone value and 334 for the maximum Solar.R value.
c. Print the day having maximum wind and the day having a minimum temperature. Your code should print Month Day 48 6 17 as the day has maximum wind. Your code should also print Month Day 5 5 5 as the day has a minimum temperature.
d. Create a point plot to show the relation between the temperature and the wind. Include a smooth line to show this relationship. Your code should create the plot below:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started