I have two matrices A and B, where matrix A of order 26124 and matrix B of order 10424, I want to merge matrix B in A in such a way that rows of B [1,2,3,4,5,...,104] are merge in following row position in A as [5,6,12,13,19,20,26,27,33,34,40,41,47,48,54,55,61,62,68,69,75,76,82,83,89,90,96,97,....]
so that matrix A becomes of order 365*24. How I could do this in R?