The R function rep() replicates each element of a vector:
> rep(c(\"A\",\"B\"), times=2) [1] \"A\" \"B\" \"A\" \"B\"
This is like the list m
The following might work for you:
>>>[['a','b'],['A','B']]*5 [['a', 'b'], ['A', 'B'], ['a', 'b'], ['A', 'B'], ['a', 'b'], ['A', 'B'], ['a', 'b'], ['A', 'B'], ['a', 'b'], ['A', 'B']]