Question: Section 1 : write a R script to complete the following tasks on data cleaning and descriptive statistics: Set the R working directory on your

Section 1: write a R script to complete the following tasks on data cleaning and descriptive statistics:
Set the R working directory on your computer.
Import "airquality" data from any of the format: Rdata, csv, or txt and name it as raw.
Change variable name "Solar.R" to "SolarRadiation"
Get mean ozone level for the following sample or sub-samples.
the overall mean Ozone level for the entire samplemean ozone level when Temp is no higher than 70 langmean ozone level when Temp is higher than 70 but below 80 langmean ozone level when Temp is above 80 lang but wind is no higher than 10 miles per hour
Create a histogram for Ozone level.
Calculate the variance and the standard deviation of Ozone
Get a subsample of data with no missing value for Ozone variable using na.omit() function and name the new data as raw_no_NA. Feel free to copy, paste, and run the following code to your script: raw_no_NA <- na.omit(insert the name of your data). You can read for details about theomit functionLinks to an external site..
Calculate correlation coefficients for the following three pairs:
Ozone with WindOzone with TempOzone with SolarRadiation
Calculate a complex mean Ozone level for each month and make a bar plot.
Tabulate variable MonthUse function tapply() to generate mean ozone level for each monthGenerate a bar plot for monthly mean ozone levels.Assign the title of the bar plot as Ozone level by MonthLabel x axis as MonthLabel y axis as Mean Ozone LevelUse rainbow color or heat colors for the barsAdd the value of May, June, July, August, September to the x axis.
Generate an xy plot for Ozone and Solar Radiation.

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 Programming Questions!