Re: [R] sample consecutive integers efficiently

2008-08-28 Thread Chris Oldmeadow
Charles C. Berry wrote: On Thu, 28 Aug 2008, Chris Oldmeadow wrote: Hi all, I have some rough code to sample consecutive integers with length according to a vector of lengths #sample space (representing positions) pos<-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) #sample lengths

Re: [R] sample consecutive integers efficiently

2008-08-28 Thread Charles C. Berry
On Thu, 28 Aug 2008, Chris Oldmeadow wrote: Hi all, I have some rough code to sample consecutive integers with length according to a vector of lengths #sample space (representing positions) pos<-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) #sample lengths lengths<-c(2,3,2) From th

[R] sample consecutive integers efficiently

2008-08-28 Thread Chris Oldmeadow
Hi all, I have some rough code to sample consecutive integers with length according to a vector of lengths #sample space (representing positions) pos<-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) #sample lengths lengths<-c(2,3,2) From these two vectors I need a vector of sampled pos