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
Something is weird here, since you have the names files joined with its length and separated by a comma. Am I right?. I believe that since you have only 1 column as I can see from the dim(). It is likely that you need to do the `read.csv` in a different way to be able to separate both values, like using a different sep value. I need to know the format of the original file to suggest you

In that case none of these suggestions will work because the genes name are common, but then the length value has to be the same to do a merge