Article / Updated 03-26-2016
To dive a bit deeper into how you can use vectors in R, let’s consider this All-Star Grannies example. You have two vectors that contain the number of baskets that Granny and her friend Geraldine scored in the six games of this basketball season:
> baskets.of.Granny <- c(12, 4, 4, 6, 9, 3)
> baskets.of.Geraldine <- c(5, 3, 2, 2, 12, 9)
The c() function stands for combine.