How to do it...

Perform the following steps to explore and visualize data:

  1. First, you can use a bar plot and histogram to generate descriptive statistics for each attribute, starting with Ozone. The following code gives us a bar plot for Ozone Observations:
        > barplot(table(mydata$Ozone), main="Ozone Observations",        xlab="O bservations", ylab="Frequency")
Ozone observation
  1. We can generate the bar plot of Temp using the following code:
        > barplot(table(mydata$Temp), main="Temperature Observations",         xlab="Temprature", ylab="Frequency")

Get Machine Learning with R Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.