Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Know your problem
Know your data
5. Look at your data
Visualise your data
Work with your chart
Check yourself


We will be using three variables from the alcohol_consumption dataset in our data visualization. They are:

  • country - the name of the country,
  • pattern - the level of danger related to that type of alcohol consumption,
  • consumption - How many liters of pure alcohol are consumed per adult.
These variables are observations collected from 161 countries worldwide.

We know what variables to expect in our dataset. Nevertheless, it is always good to examine the real data and any sample observations before working on the problem at hand.


Your first task is to look at the first fifteen observations from the alcohol_consumption dataset. To do that use the R function head:

head(dataset, number)

This function has two arguments:

  • dataset - the name of the dataset you want to look at,
  • number - how many rows you want to see.
When you're done, press the Run and Check Code button to check your code.

Stuck? Here's a hint!

In Code Editor type:

head(alcohol_consumption, 15)