[R] Create weird type of sequences
ligges at statistik.tu-dortmund.de
Thu Mar 22 18:10:10 CET 2012
On 22.03.2012 18:03, Alaios wrote:
> 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?
We do not answer homework questions.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help