I was thinking that using basic matrix operations (an outer product by a unit vector) would also do the trick for expanding the matrices instead of repeat. For example:

a = {1 2 3};
R = j(3, 1, 1)*a;
reproduces your matrix R and

b = {1, 2, 3};
C = b*j(1, 3, 1);
reproduces your matrix C.