Vectors in R
R Vector is a fixed length collection of similar type of elements.
A vector in R programming is one-dimensional.
A vector in R language can be compared to a one-dimensional array in other programming languages like C, Java, etc.
An R Vector can contain elements belonging to one of these types: logical, integer, double, complex, character and raw.
R Vector Tutorials
Create Vectors
Access Vectors
- R – Vector Length
- R – Access Items in Vector
- R – Iterate over Items of Vector
- R – Delete Items at Specific Indices from Vector
Sorting
Other Vector Operations
Vector Checks
- R – Check if Specific Item is present in Vector
- R – Check if type of Vector is Logical
- R – Check if type of Vector is Integer
- R – Check if type of Vector is Double
- R – Check if type of Vector is Character
Conversions
Conclusion
In this R Tutorial, we have learnt how to create an R Vector, how to perform arithmetic operations on vectors, what is element recycling in R Vector and also sorting an R Vector.