Monday 15 June 2015

R : Combine Vectors

“c” function is used to combine two vectors.
> vector1 <- 1:6
> vector2 <- 4:10
> vector1
[1] 1 2 3 4 5 6
> vector2
[1]  4  5  6  7  8  9 10
> 
> vector3 <- c(vector1, vector2)
> vector3
 [1]  1  2  3  4  5  6  4  5  6  7  8  9 10


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment