[R] Sampling of non-overlapping intervals of variable length
Hadassa Brunschwig
hadassa.brunschwig at mail.huji.ac.il
Sun Jul 19 19:05:17 CEST 2009
Hi,
I hope I am not repeating a question which has been posed already.
I am trying to do the following in the most efficient way:
I would like to sample from a finite (large) set of integers n non-overlapping
intervals, where each interval i has a different, set length L_i
(which is the number
of integers in the interval).
I had the idea to sample recursively on a vector with the already
chosen intervals
discarded but that seems to be too complicated.
Any suggestions on that?
Thanks a lot.
Hadassa
--
Hadassa Brunschwig
PhD Student
Department of Statistics
The Hebrew University of Jerusalem
http://www.stat.huji.ac.il
More information about the R-help
mailing list