Spring Deals - hours only!Up to 70% off on all courses and bundles.-Close
What are vectors?
Vector operations
Indexing and filtering
Simple analysis


Awesome! If you're analyzing a categorical variable and would like to visualize a frequency count per category, you can use the barplot() function. We already learned that a frequency count is calculated with the table() function, like this:


Now, if we want to visualize these frequencies, we can simply pass in this frequency table to the barplot() function, like so:


In this case, R will produce a visualization that allows you to more easily read off the number of employees that know a given language:

barplot image


Visualize the frequency count of the country_origin vector. This vector contains names of employee's home countries.

Stuck? Here's a hint!

Use barplot() in combination with the table() function.