Friends,

I have a microarray dataset AGI IDs in row and samples in column and txt file of transcription factor (AGI IDs), my supervisor asked me to find and extract the expression of only genes existed in my transcription factor list in another word I should extract the rows those are transcription factor. as already I need your help

Thank you
<p>Take a look at <a href="https://stat.ethz.ch/R-manual/R-devel/library/base/html/sets.html"><code>?intersect</code></a>.</p>

<pre>
&gt; v1 &lt;- c(&quot;GATA1&quot;, &quot;CTCF&quot;, &quot;HOXB1&quot;)
&gt; v2 &lt;- c(&quot;C3&quot;, &quot;ATF&quot;, &quot;SOX1&quot;, &quot;CTCF&quot;, &quot;OCT3&quot;)
&gt; intersect(v1, v2)
[1] &quot;CTCF&quot;
&gt; </pre>

<p>If you are trying to build a subset of a data frame, you can use <code>%in%</code>. See the examples <a href="http://www.ats.ucla.edu/stat/r/faq/subset_R.htm">here</a>.</p>
