我想通过使用rep或任何其他函数在 R 中创建以下序列。
rep
c(1, 2, 3, 4, 5, 2, 3, 4, 5, 3, 4, 5, 4, 5, 5)
基本上,c(1:5, 2:5, 3:5, 4:5, 5:5)。
c(1:5, 2:5, 3:5, 4:5, 5:5)
math r vector sequence rep
math ×1
r ×1
rep ×1
sequence ×1
vector ×1