I would like to create the follow sequence without a loop for a value d greater equal 1:
c(d:2, d:3, d:4, ..., d:(d-1), d)
Is this possible?
Thank you in advance!
I would like to create the follow sequence without a loop for a value d greater equal 1:
c(d:2, d:3, d:4, ..., d:(d-1), d)
Is this possible?
Thank you in advance!
If you want from 1 to d
sapply(1:d,function(x){seq(x,d)})
if you want from d to 1
sapply(1:d,function(x){seq(d,x)})