I want to create a sequence starting at 10 and that sequence be the length of a vector.
length(myVec) = 3
seq(length(myVec), 10)
However my issue here is that the sequence counts down from 10 to 3 whereas I need it to do from 10 to 12, which is the length of myVec, like so;
seq(length(myVec), 10)
10, 11, 12
>Solution :
Lots of ways to solve this, but here’s one:
> seq(from = 10, length.out = 3)
[1] 10 11 12
You can obviously change the hardcoded values to variables to better fit your use case.