Re: [R] Finding pairs with least magnitude difference from mean

2011-03-01 Thread rex.dwyer
o:r-help-boun...@r-project.org] On Behalf Of Hans W Borchers Sent: Monday, February 28, 2011 2:17 PM To: r-h...@stat.math.ethz.ch Subject: Re: [R] Finding pairs with least magnitude difference from mean syngenta.com> writes: > James, > It seems the 2*mean(x) term is irrelevant if you

Re: [R] Finding pairs with least magnitude difference from mean

2011-02-28 Thread Hans W Borchers
syngenta.com> writes: > James, > It seems the 2*mean(x) term is irrelevant if you are seeking to > minimize sd. Then you want to sort the distances from smallest to > largest. Then it seems clear that your five values will be adjacent in > the list, since if you have a set of five adjacent value

Re: [R] Finding pairs with least magnitude difference from mean

2011-02-28 Thread rex.dwyer
Re: [R] Finding pairs with least magnitude difference from mean > I have what I think is some kind of linear programming question. > Basically, what I want to figure out is if I have a vector of numbers, > > > x <- rnorm(10) > > x > [1] -0.44305959 -0.26707077 0.071

Re: [R] Finding pairs with least magnitude difference from mean

2011-02-26 Thread Hans W Borchers
> I have what I think is some kind of linear programming question. > Basically, what I want to figure out is if I have a vector of numbers, > > > x <- rnorm(10) > > x > [1] -0.44305959 -0.26707077 0.07121266 0.44123714 -1.10323616 > -0.19712807 0.20679494 -0.98629992 0.97191659 -0.77561593 >

[R] Finding pairs with least magnitude difference from mean

2011-02-25 Thread jctoll
Hi, I have what I think is some kind of linear programming question. Basically, what I want to figure out is if I have a vector of numbers, > x <- rnorm(10) > x [1] -0.44305959 -0.26707077 0.07121266 0.44123714 -1.10323616 -0.19712807 0.20679494 -0.98629992 0.97191659 -0.77561593 > mean(x)