Nicely done! We've seen that you can use the
summary() function when dealing with numeric columns. If you have a character column, though, finding a minimum or maximum value does not make sense. However, you may want to count the occurrence of a certain value for each category.
For example, we want to find the number of employees that know a given foreign language. We can calculate it with the
table() function, like this:
With this expression, R will count the number of occurrences of each value from the
Polish French German Japanese
4 5 3 1
You will use
table() quite often. Try it yourself in the exercise!