title: How can I convert Ensembl ID to gene symbol in R?
body: <p>I have a data.frame containing Ensembl IDs in one column; I would like to find corresponding gene symbols for the values of that column and add them to a new column in my data frame.
  I used bioMaRt but It couldn't find any of the Ensembl IDs!</p>
  
  <p>Here is my sample data (<code>df[1:2,]</code>):</p>
  
  <pre><code>row.names organism    gene
  41  Homo-Sapiens ENSP00000335357
  115 Homo-Sapiens ENSP00000227378
  </code></pre>
  
  <p>and I want to get something like this  </p>
  
  <pre><code>row.names organism    gene         id
  41  Homo-Sapiens ENSP00000335357   CDKN3
  115 Homo-Sapiens ENSP00000227378   HSPA8
  </code></pre>
  
  <p>and here is my code:</p>
  
  <pre><code>library('biomaRt')
  mart &lt;- useDataset("hsapiens_gene_ensembl", useMart("ensembl"))
  genes &lt;- df$genes
  df$id &lt;- NA
  G_list &lt;- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id",
  "entrezgene", "description"),values=genes,mart= mart)
  </code></pre>
  
  <p>Then I get this when I check the G_list</p>
  
  <pre><code>[1] ensembl_gene_id entrezgene      description  &lt;0 rows&gt; (or 0-length row.names)
  </code></pre>
  
  <p>So I couldn't add G_list to my df! because there is nothing to add!</p>
  
  <p>Thanks in Advance,</p>