Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
What are vectors?
Vector operations
Indexing and filtering
Simple analysis
Summary

Instruction

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:

table(known_languages)

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

barplot(table(known_languages))

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:

Exercise

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.