The seq() function can be used to create a vector with any step size in the sequence. The format of the seq() function is as follows:
seq(from, to, step_size)
Here is an example to create a vector with a difference between its elements 2.
> a=seq(1,11,2)> a 1 3 5 7 9 11