Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

How can I exclude rows from a table, using the rows' names from another table? [duplicate]

$
0
0

This question already has an answer here:

I have a .csv table1

    A   B   C   D   E
gene1   1   3   5   9
gene2   0   0   4   4
gene3   1   0   1   2
gene4   5   5   0   10
gene5   2   0   0   2

I also have another .csv table2

    A   B   C   D   E
gene3   1   0   1   2
gene5   2   0   0   2

Genes from table2 are the genes that I don't want to see in table1. The result would look like table_final:

    A   B   C   D   E
gene1   1   3   5   9
gene2   0   0   4   4
gene4   5   5   0   10

What is the best way to do it? Should I use R or Linux command?


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>