I have a text file contains three columns; the first coulmn is the Ensemble gene id, the second column is gene name, and the third column is FPKM. I am looking for R function to keep the Ensemble gene id that highly expressed (i.e has highest FPKM) only in this file.
Example: from the data below, I want only to keep ENSMUST00000062483 Gli2 0.157666 which has the highest FPKM
That's a very basic R question. I would suggest you to follow tutorial on basic R programming, this will make everything less painful in the long run. Specifically, you are looking for the row (slicing) for which the FPKM value is equal to the maximum value of all FPKM values.