If you want to perform that you can simply use the rep() to repeat x and y, n times.
x <- 13
y <- 10
n <- 2
rep(c(x, y), n)
#[1] 13 10 13 10
If you want to use for loop, you can also do that, refer the following :
vector <- integer(2 * n)
for (i in seq_len(n)) {
vector[c(2 * i -1, 2 * i)] <- c(x, y)
}
vector
#[1] 13 10 13 10
If you are a beginner and want to know more R, then do check out the R programming tutorial that will help you in learning R from scratch.