Hello!

```
# I have got this vector:
a <- c("1", "2", "3", "4", "5", "6", "7")
#[1] "1" "2" "3" "4" "5" "6" "7"
# and I would like to have this vector:
# [1] 1_A1 1_A2 1_A7 2_A1 2_A2 2_A7 3_A1 3_A2 3_A7 4_A1 4_A2 4_A7 5_A1 5_A2 5_A7 6_A1 6_A2 6_A7 7_A1 7_A2 7_A7
# My solution started with:
r1 <- rep(a, each=3)
# [1] "1" "1" "1" "2" "2" "2" "3" "3" "3" "4" "4" "4" "5" "5" "5" "6" "6" "6" "7" "7" "7"
# Then I created this vector:
b <- c("_A1","_A2","_A7")
# [1] "_A1" "_A2" "_A7"
# And then I replicated the previous vector 7 times
r2 <- rep(b,times=7)
# [1] "_A1" "_A2" "_A7" "_A1" "_A2" "_A7" "_A1" "_A2" "_A7" "_A1" "_A2" "_A7" "_A1" "_A2" "_A7" "_A1" "_A2" "_A7" "_A1" "_A2" "_A7"
```

Now I would like to combine vector r1 and vector r2 to achieve my desired vector. Any help?

Or is my solution quite cumbersome and there is a better solution? Maybe with a for-loop?

Thank you!