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


All right. Now that you know how to read and create vectors of different kinds, we can start performing some simple data analysis.

When you start any data analysis, you need to take a look at the distribution of the data. R has many built-in functions that help you investigate the distribution of the data. The first of such functions the min() function. It returns the minimum value of a vector.

Let's say you would like to know the age of the youngest employee at Versico. The employee ages are stored in the vector named ages. We can pass our vector into the min() function as an argument and have it return the minimum of all elements, like so:



You're interested in determining the minimum salary paid at Versico. The employee salaries are stored in the vector named salaries. Find the lowest salary at Versico.