Search notes:

R function: seq_along

seq_along(vec) is equivalent to 1:length(v).
seq_along(4:10)
# [1] 1 2 3 4 5 6 7

seq_along(4)
# [1] 1

# Compare to seq()  -- s.a. http://stackoverflow.com/questions/13732062/seq-vs-seq-along-when-will-using-seq-cause-unintended-results
seq(4:10)
# [1] 1 2 3 4 5 6 7

seq(4)
# [1] 1 2 3 4
Github repository about-r, path: /functions/seq_along.R
Martin Mächler points out that seq_along was created in R 2.9.2 for performance reasons.

See also

seq
Index to (some) R functions

Index