Re: [R] calculating an N50

2008-11-25 Thread Daniel Malter
t.org Betreff: Re: [R] calculating an N50 > Given a set of integers of different values how do I calculate the > minimum number of the largest of integers that are required, when > summed, to equal 50% of the total sum of the the set? > Actually I need the value of the smallest member

Re: [R] calculating an N50

2008-11-25 Thread Barry Rowlingson
2008/11/25 Jeremy Leipzig <[EMAIL PROTECTED]>: >> Given a set of integers of different values how do I calculate the >> minimum number of the largest of integers that are required, when >> summed, to equal 50% of the total sum of the the set? >> > Actually I need the value of the smallest member su

Re: [R] calculating an N50

2008-11-25 Thread Greg Snow
f Of Jeremy Leipzig > Sent: Tuesday, November 25, 2008 10:45 AM > To: r-help@r-project.org > Subject: Re: [R] calculating an N50 > > > Given a set of integers of different values how do I calculate the > > minimum number of the largest of integers that are required, when &g

Re: [R] calculating an N50

2008-11-25 Thread Jeremy Leipzig
> Given a set of integers of different values how do I calculate the > minimum number of the largest of integers that are required, when > summed, to equal 50% of the total sum of the the set? > Actually I need the value of the smallest member such that the sum of all members equal or greater to th

[R] calculating an N50

2008-11-25 Thread Jeremy Leipzig
Given a set of integers of different values how do I calculate the minimum number of the largest of integers that are required, when summed, to equal 50% of the total sum of the the set? For example, > length(myTable$lgth) [1] 303403 > sum(myTable$lgth) [1] 4735396 I know through brute force that