R Programming Repeat elements of Vector