Re: [R] Random sampling while keeping distribution of nearest ne

2009-08-12 Thread Emmanuel Levy
Thanks for your suggestion Ted, This would indeed work for the particular example I gave, but I am looking for a general solution. For example, if my values are: V=c(2,4,5,6) Then there would be two possibilities: 2,4,5,6 or 4,5,6,8 more generally, what I mean is that the matrix of distances betw

Re: [R] Random sampling while keeping distribution of nearest ne

2009-08-12 Thread Ted Harding
On 12-Aug-09 22:05:24, Emmanuel Levy wrote: > Dear All, > I cannot find a solution to the following problem although I imagine > that it is a classic, hence my email. > > I have a vector V of X values comprised between 1 and N. > > I would like to get random samples of X values also comprised bet