A vector is the basic data structure in R that stores data of similar types. For example,

Suppose we need to record the age of 5 employees. Instead of creating 5 separate variables, we can simply create a vector.

Elements of a Vector

Create a Ve…

Continue reading: R …