Displaying 1 result from an estimated 1 matches for "weirseq".
Did you mean:
weirder
2012 Mar 22
2
Create weird type of sequences
Dear all,
I would like to create the following sequence of numbers
1 2 2 3 3 3 3 4 4 4 4 4 4 4 4 and so on (actually I double the number of same elements)....
the reason is that I want then to feed the sequence above to
tapply(myVector, weirSeq, FUN = mean)
and then average over those...
Could you please provide some guidance how I can create such a sequence in R?
Regards
Alex
[[alternative HTML version deleted]]