My logic is failing. But could you help me create a vector of numbers in R with this rule here?
Vetor=1,222,2,223,3,224,4,.......,221,442
Many thanks.
My logic is failing. But could you help me create a vector of numbers in R with this rule here?
Vetor=1,222,2,223,3,224,4,.......,221,442
Many thanks.
I would do so:
rep(1:221, each = 2) + c(0, 221)
Use rbind()
to merge sequences.
x = rep(1:221)
y = (x + 221)
Vetor = c(rbind(x, y))
head(Vetor)
#[1] 1 222 2 223 3 224