juniorR

What are vectors in R?

Updated May 24, 2026

Short answer

Vectors are basic data structures that hold elements of the same type.

Deep explanation

R vectors are homogeneous and support element-wise operations.

Real-world example

Storing daily temperatures as numeric vectors.

Common mistakes

  • Mixing data types unintentionally.

Follow-up questions

  • What is vector recycling?
  • How do you create a vector?

More R interview questions

View all →