Hi,

I have two lists of genes

    mycounts <- read.csv("geneID and length.csv", header = T, sep = "\t", stringsAsFactors = FALSE)

```
> colnames(mycounts)
[1] "genesID.geneslength"

> head(mycounts[1:4,])
[1] "R0010W,1272" "R0020C,1122" "R0030W,546"  "R0040C,891"

> dim(mycounts)
[1] 7130    1
```

    mycounts1 <- read.table("read.txt", header = T, sep = "\t", stringsAsFactors = FALSE)

```
> dim(mycounts1)
[1] 5961    1
> colnames(mycounts1)
[1] "Freq"
```

How I can have only genes in my read file in my genes file? I mean genes file has 7130 that I only need 5961 of them

May you help me please? Thank you
See `%in%` operator, e.g.:

    data1_subset <- data1[ data1$genes %in% data2$genes, ]

Or we can use `merge`, e.g.:

    data1_merge <- merge(data1, data2, by = "gene")