Vectors in R programming Language:

R programming is one of the most popular languages when it comes to data science, statistical computations or scientific research. R programming is widely used in machine learning and it is very efficient and user-friendly. It provides flexibility in doing big statistical operations with a few lines of code.

Vectors in R are the same as the arrays in C language which are used to hold multiple data values of the same type. One major key point is that in R the indexing of the vector will start from ‘1’ and not from ‘0’. We can create numeric vectors and character vectors as well.

Here the last Index of the Vector is 10, so the length of the vector is 10

Types of vectors: There are Many types of Vectors, But in this Post we will see the Mostly used Vectors

  1. Numeric vector : Numeric vectors are those which contain numeric values such as integer and float.
  2. Character vector :Character vectors contain alphanumeric values and special characters.
Here The Length of the vector is 7 , index are from ( 1 to 7 ) and Values are Swaroopa, Sri, Jo, Reshma, Hareesh & supriya

3.Logical vector :Logical vectors contain Boolean values such as TRUE, FALSE and NA for Null values

Let’s Create Vectors in the Next post.

0 0 votes
Article Rating
1 Comment
Newest
Oldest Most Voted
Inline Feedbacks
View all comments