1. Learn
  2. /
  3. Courses
  4. /
  5. Intro to Statistics with R: Introduction

Exercise

Setting up histograms

Can you reproduce the histograms showing the distributions of ratings for the Australian wines? As you saw in the video, the distributions for the Shiraz (red) and the Pinot Grigio (white) should look different.

Instructions

100 XP
  • A data frame containing the Australian wine ratings, wine_data, has been loaded into your workspace. Take a look by printing it to the console.
  • Create two subsets red_wine and white_wine using the subset() function.
  • Plot a histogram of the ratings for each subset. Label both x-axes with "Ratings" and title each histogram according to the type of wine displayed: "Shiraz" or "Pinot Grigio".