Re: [R] merge function in R?

2010-08-16 Thread fishkbob
Thanks Chuck, I was trying to implement something more complicated than what I had to and after finding the reduce() function in bioconductor, everything went smoothly. Thanks again -- View this message in context: http://r.789695.n4.nabble.com/merge-function-in-R-tp2324684p2327133.html Sent

Re: [R] merge function in R?

2010-08-13 Thread Charles C. Berry
On Fri, 13 Aug 2010, fishkbob wrote: So I have a bunch of c(start,end) points and want to consolidate them into as few c(start,end) as possible. For example: sample startend A 5 10 B 7 18 C 14 D 16 20 I'd want

[R] merge function in R?

2010-08-13 Thread fishkbob
So I have a bunch of c(start,end) points and want to consolidate them into as few c(start,end) as possible. For example: sample startend A 5 10 B 7 18 C 14 D 16 20 I'd want the function to return the two distinct

Re: [R] merge function in R?

2010-08-13 Thread David Winsemius
Neither you nor your responder have continued the eamil chain very well so let me put things back together: on Aug 13, 2010; 03:54pm fishkbob wrote subj = merge function in R? So I have a bunch of c(start,end) points and want to consolidate them into as few c(start,end) as possible. For ex

Re: [R] merge function in R?

2010-08-13 Thread fishkbob
I too think I worded it incorrectly... so the second two columns of the matrix are the start and end of an interval however, because some of the intervals overlap, I want to limit the number of intervals I have to deal with. So therefore, (5 10)should merge with(7 18) making

Re: [R] merge function in R?

2010-08-13 Thread JesperHybel
I think it would be helpful if you could clarify youre question - do you want distinct sets - maybe use unique() but why (5,20) when its (5,10) in the row in youre example? What criteria do you want the function to select the "sets" by and what kind of output do you need? Maybe it's just me w