# R Programming: Combine three arrays so that the first row of the first array is followed by the first row of the second array and then first row of the third array

I hope every article can give you some new information. In that sense today we are going to know very clearly about R Programming: Combine three arrays so that the first row of the first array is followed by the first row of the second array and then first row of the third array. Let’s go into our article.

## R Programming: Combine three arrays so that the first row of the first array is followed by the first row of the second array and then first row of the third array

``````#https://bit.ly/2QkvW10
num1 = rbind(rep("A",3), rep("B",3), rep("C",3))
print("num1")
print(num1)
num2 = rbind(rep("P",3), rep("Q",3), rep("R",3))
print("num2")
print(num2)
num3 = rbind(rep("X",3), rep("Y",3), rep("Z",3))
print("num3")
print(num3)
a = matrix(t(cbind(num1,num2,num3)),ncol=3, byrow=T)
print("Combine three arrays, taking one row from each one by one:")
print(a)
``````
``` "num1"
[,1] [,2] [,3]
[1,] "A"  "A"  "A"
[2,] "B"  "B"  "B"
[3,] "C"  "C"  "C"
 "num2"
[,1] [,2] [,3]
[1,] "P"  "P"  "P"
[2,] "Q"  "Q"  "Q"
[3,] "R"  "R"  "R"
 "num3"
[,1] [,2] [,3]
[1,] "X"  "X"  "X"
[2,] "Y"  "Y"  "Y"
[3,] "Z"  "Z"  "Z"
 "Combine three arrays, taking one row from each one by one:"
[,1] [,2] [,3]
[1,] "A"  "A"  "A"
[2,] "P"  "P"  "P"
[3,] "X"  "X"  "X"
[4,] "B"  "B"  "B"
[5,] "Q"  "Q"  "Q"
[6,] "Y"  "Y"  "Y"
[7,] "C"  "C"  "C"
[8,] "R"  "R"  "R"
[9,] "Z"  "Z"  "Z"
```

## Final Words

R Programming: Combine three arrays so that the first row of the first array is followed by the first row of the second array and then first row of the third array Article We hope you have all the information you need. Let me know if you have any doubts about this article. Thanks. Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Deekshi. Here, I post about programming to help developers.

Share on: