gene column matching in R
0
1
Entering edit mode
8.1 years ago
Kritika ▴ 260

hello all i have three file only contain gene name in all three flle file 1 Colunm1 gene_name XXX YYY

file2 Column1 Gene_name XXX YYY similar for file three

i want to find the common gene between all the 3 files using R can anyone help

R Gene Column Match • 1.7k views
ADD COMMENT
0
Entering edit mode

What have you tried? You first tag, "match", is a possible solution, in fact...

ADD REPLY
0
Entering edit mode

i did with common_first <- file1$gene_name %in% file2$gene_name this gave me logical values i need gene_name in my common_first vector

ADD REPLY
1
Entering edit mode

Try this:

common_first <- file1[file1$gene_name %in% file2$gene_name,]
ADD REPLY
1
Entering edit mode

oh thanks b.nota i remember i did this before too for one of my analysis.. Thanks alot...

ADD REPLY

Login before adding your answer.

Traffic: 2735 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6