Question: Airquality data set is inbuilt in R Using function data() to load R data set airquality. Provide the simplest R code and output for all

 Airquality data set is inbuilt in R Using function data() to

Airquality data set is inbuilt in R

Using function data() to load R data set airquality. Provide the simplest R code and output for all of the following. The code should work for any given data. a) Use the diff function to calculate the temperature differences between consecutive days. Insert the value 0 at the beginning of these differences. Add this result as the DIFFS column of the data frame. b) Calculate the number of days that are colder than the previous day? c) Show the median temperature of each month and the hottest day of each month (May to Sept.). Do not hard code the month. Print out your result with some text description. For example, The median temperature for May is xxx; The hottest day in May is yyy

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!