# R program to illustrate# seq_along function# Calling the seq_along() function
seq_along(letters[1:4])
seq_along(letters[0:3])
R
输出
[1]1234[1]123
R
例2 :
# R program to illustrate# seq_along function# Calling the seq_along() function
seq_along(c(1,2,3))
seq_along(c(5,10,15,20))
seq_along(c(2,4))
seq_along(10)
seq_along(2)