Question 1: Data Cleaning and Manipulation with airquality dataset analysis

## 'data.frame':    153 obs. of  6 variables:
##  $ Ozone  : int  41 36 12 18 NA 28 23 19 8 NA ...
##  $ Solar.R: int  190 118 149 313 NA NA 299 99 19 194 ...
##  $ Wind   : num  7.4 8 12.6 11.5 14.3 14.9 8.6 13.8 20.1 8.6 ...
##  $ Temp   : int  67 72 74 62 56 66 65 59 61 69 ...
##  $ Month  : int  5 5 5 5 5 5 5 5 5 5 ...
##  $ Day    : int  1 2 3 4 5 6 7 8 9 10 ...
HotDay Indicator (Temp > 85)
Temp HotDay
67 FALSE
72 FALSE
74 FALSE
62 FALSE
56 FALSE
66 FALSE
Average Air Quality Metrics by Month
Month Avg_Ozone Avg_SolarR Avg_Wind Avg_Temp
May 24.88710 184.3548 11.622581 65.54839
June 30.88333 190.1667 10.266667 79.10000
July 54.66129 216.4839 8.941935 83.90323
August 55.37097 175.0645 8.793548 83.96774
September 31.45000 167.4333 10.180000 76.90000

Question 2: Data Visualization with toothGrowth dataset analysis

## 'data.frame':    60 obs. of  3 variables:
##  $ len : num  4.2 11.5 7.3 5.8 6.4 10 11.2 11.2 5.2 7 ...
##  $ supp: Factor w/ 2 levels "OJ","VC": 2 2 2 2 2 2 2 2 2 2 ...
##  $ dose: num  0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 ...
##    len supp dose
## 1  4.2   VC  0.5
## 2 11.5   VC  0.5
## 3  7.3   VC  0.5
## 4  5.8   VC  0.5
## 5  6.4   VC  0.5
## 6 10.0   VC  0.5
##       len        supp         dose      
##  Min.   : 4.20   OJ:30   Min.   :0.500  
##  1st Qu.:13.07   VC:30   1st Qu.:0.500  
##  Median :19.25           Median :1.000  
##  Mean   :18.81           Mean   :1.167  
##  3rd Qu.:25.27           3rd Qu.:2.000  
##  Max.   :33.90           Max.   :2.000

Question 3:Function Writing with iris dataset analysis

## 'data.frame':    150 obs. of  5 variables:
##  $ Sepal.Length: num  5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ...
##  $ Sepal.Width : num  3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ...
##  $ Petal.Length: num  1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ...
##  $ Petal.Width : num  0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 ...
##  $ Species     : Factor w/ 3 levels "setosa","versicolor",..: 1 1 1 1 1 1 1 1 1 1 ...
##   Sepal.Length    Sepal.Width     Petal.Length    Petal.Width   
##  Min.   :4.300   Min.   :2.000   Min.   :1.000   Min.   :0.100  
##  1st Qu.:5.100   1st Qu.:2.800   1st Qu.:1.600   1st Qu.:0.300  
##  Median :5.800   Median :3.000   Median :4.350   Median :1.300  
##  Mean   :5.843   Mean   :3.057   Mean   :3.758   Mean   :1.199  
##  3rd Qu.:6.400   3rd Qu.:3.300   3rd Qu.:5.100   3rd Qu.:1.800  
##  Max.   :7.900   Max.   :4.400   Max.   :6.900   Max.   :2.500  
##        Species  
##  setosa    :50  
##  versicolor:50  
##  virginica :50  
##                 
##                 
## 
Petal Length Summary Statistics
Statistic Value
Mean_Petal_Length Mean_Petal_Length 3.758000
Median_Petal_Length Median_Petal_Length 4.350000
SD_Petal_Length SD_Petal_Length 1.765298
Count_GT5 Count_GT5 42.000000

Question 4:Looping and Conditional Statements with mtcars dataset analysis

## [1] "Standard Efficiency : Mazda RX4"
## [1] "Standard Efficiency : Mazda RX4 Wag"
## [1] "Standard Efficiency : Datsun 710"
## [1] "Standard Efficiency : Hornet 4 Drive"
## [1] "Standard Efficiency : Hornet Sportabout"
## [1] "Standard Efficiency : Valiant"
## [1] "Standard Efficiency : Duster 360"
## [1] "Standard Efficiency : Merc 240D"
## [1] "Standard Efficiency : Merc 230"
## [1] "Standard Efficiency : Merc 280"
## [1] "Standard Efficiency : Merc 280C"
## [1] "Standard Efficiency : Merc 450SE"
## [1] "Standard Efficiency : Merc 450SL"
## [1] "Standard Efficiency : Merc 450SLC"
## [1] "Standard Efficiency : Cadillac Fleetwood"
## [1] "Standard Efficiency : Lincoln Continental"
## [1] "Standard Efficiency : Chrysler Imperial"
## [1] "Fuel Efficient : Fiat 128"
## [1] "Fuel Efficient : Honda Civic"
## [1] "Fuel Efficient : Toyota Corolla"
## [1] "Standard Efficiency : Toyota Corona"
## [1] "Standard Efficiency : Dodge Challenger"
## [1] "Standard Efficiency : AMC Javelin"
## [1] "Standard Efficiency : Camaro Z28"
## [1] "Standard Efficiency : Pontiac Firebird"
## [1] "Fuel Efficient : Fiat X1-9"
## [1] "Fuel Efficient : Porsche 914-2"
## [1] "Fuel Efficient : Lotus Europa"
## [1] "Standard Efficiency : Ford Pantera L"
## [1] "Standard Efficiency : Ferrari Dino"
## [1] "Standard Efficiency : Maserati Bora"
## [1] "Standard Efficiency : Volvo 142E"
## [1] "Total Fuel Efficient Cars: 6"