Combine values into a vector

R always creates lists of values—even when there is only one value in a list. These lists are called vectors and they make working with data much easier.

  • Everything is a vector
  • Get to know different data types in R
  • Learn how to create vectors
  • Use the : operator to create numeric sequences
  • Use the concatenate function c() to create vectors of different data types
c(1, 2, 3, 4)
c("abc", "def", "ghi")
View Interactive Version