Skip to main content

Posts

Showing posts with the label airqualitydataset

Initial Data Analysis - handling missing data (airquality dataset)

In some cases there are missing data or the missing data has been coded in a way that we didn't expected, we have to be very careful with these situacions. In this example we work with the dataset airquality require(datasets) data("airquality") ?airquality #gives us important info about the dataset A data frame with 154 observations on 6 variables. [,1] Ozone numeric Ozone (ppb) [,2] Solar.R numeric Solar R (lang) [,3] Wind numeric Wind (mph) [,4] Temp numeric Temperature (degrees F) [,5] Month numeric Month (1–12) [ ,6] Day numeric Day of month (1–31) head(airquality) #shows the first rows in the dataset ## Ozone Solar.R Wind Temp Month Day ## 1 41 190 7.4 67 5 1 ## 2 36 118 8.0 72 5 2 ## 3 12 149 12.6 74 5 3 ## 4 18 313 11.5 62 5 4 ## 5 NA NA 14.3 56 5 5 ## 6 28 NA 14.9 66 5 6 str(airqua...