Perfect! Of course, just like ordinary variables, vectors can also contain strings, not just numbers. When a vector contains strings, we call it a character vector.
You can create a character vector with the
c() function, just as you did for numeric vectors. The only difference is that your elements now need to be surrounded in single or double quotation marks because they are strings, like so:
c("Mary", "John", "Tim", Alex", "Kim", "Stuart")
Let's create a vector named
name that stores the names of Versico's top five employees with the highest salaries:
names <- c("Tim Pearson", "John Smith", "Emma Stone", "Ana Kovach", "Mia Balicki")