s-news
[Top] [All Lists]

conditional rows selecting from a data frame

To: <s-news@lists.biostat.wustl.edu>
Subject: conditional rows selecting from a data frame
From: "Khan, Sohail" <khan@cshl.edu>
Date: Wed, 5 Jul 2006 14:09:01 -0400
Thread-index: AcagXhf6OQtaUAcTTwCxz8/JbUjWjw==
Thread-topic: conditional rows selecting from a data frame
Dear List,

I have two data frames as follows:
df1
probe   start   end
xyz     20      70
xxy     125     175
aab     215     265
....    ....    .....
....    ....    ....

df2
frag    start   end
fg1     10      100
fg2     150     250
fg3     300     390
...     ....    ....

I would like to read probe, start and end from df1, compare it to start, end in 
df2.  If the start and end of df1 falls within start and end of df2, I want to 
print probe start and end from df1, otherwise ignore it.  Thank you for any 
suggestions.



-Sohail

<Prev in Thread] Current Thread [Next in Thread>