I have 4 data frames of genes, each data frame has gene names as row and about 20 columns of sample data. Thus each matrix has that amount of rows (genes): 

* A: 10,000 genes
* B: 15,000 genes
* C: 35,000 genes
* D: 12,000 genes

Here is what I tried, it didn't select the complete list of 9,000 common row (Genes)

```
Data_A = read.csv("matrix_A.csv");
Data_B = read.csv("matrix_B.csv");
Data_C = read.csv("matrix_C.csv");
Data_D = read.csv("matrix_D.csv");

Expr_A = as.data.frame(t(Data_A[, -c(1:8)]))
Expr_B = as.data.frame(t(Data_B[, -c(1:8)]))
Expr_C = as.data.frame(t(Data_C[, -c(1:8)]))
Expr_D = as.data.frame(t(Data_D[, -c(1:8)]))

commonGenes1 = intersect (rownames(Data_A),rownames(Data_D))
commonGenes2 = intersect (rownames(Data_B),rownames(Data_D))
commonGenes3 = intersect (rownames(Data_C),rownames(Data_D))

Data_A = Data_A[commonGenes1,]
Data_B = Data_B[commonGenes2,]
Data_C = Data_C[commonGenes3,]

```

They all have 9,000 genes in common, though the data are so big I can't do this in Excel. I'm using R to treat the data, is there a way to select the common genes between the 4 data frames in R? 

An example of the 4 matrices is here:
<http://www.filedropper.com/matrixexample>