Skip to content
Prev 275583 / 398506 Next

[BioC] comparing two tables

Hi Assa,
On Wed, Oct 26, 2011 at 9:44 AM, Assa Yeroslaviz <frymor at gmail.com> wrote:
Sorry, I didn't realize you were after some personal "R study"
You have to change the "table" you are sending to the second param of
your "inregion" function.

currently you are sending into the `locs` parameter a two column table
that just has c("Start", "End"), eg:

R> Think about inregion(genetable[2, ], loctable[, c("Start", "End")])

Look at what `loctable[, c("Start", "End")]` gives you

It looks like your change to inregion should work once you pass in the
"Chr" column from your loctable (barring case-sensitive issues (you
have 'chr' and "Chr" in your separate tables), eg use your modified
inregion function and call it like so:

R> inregion(genetable[2, ], loctable[, c("Chr", "Start", "End")])

modulo this or that.