title: Updating one column based on event of another
body: <p>I have the following dataframe</p>
  
  <pre><code>GenA&lt;-rep(c("C/C","A/C"),5)
  GenB&lt;-rep(c("G/G","G/C"),5)
  GenC&lt;-rep(c("A/A","A/T","A/A","A/T","A/A"),2)
  Treatment&lt;-rep(c("A","B"),5)
  e&lt;-data.frame(GenA,GenB,GenC,Treatment)
  </code></pre>
  
  <p>With that I would like to calculate at which frequency certain genes are present in a given treatment. So I do:</p>
  
  <pre><code>e$MutA&lt;-ifelse(!(e$GenA=="C/C"),"MutA","")
  e$MutB&lt;-ifelse(!(e$GenB=="G/G"),"MutB","")
  e$MutC&lt;-ifelse(!(e$GenC=="A/A"),"MutC","")
  
  
  e$summary&lt;-paste(e$MutA,e$MutB,e$MutC,sep=",")
  round(prop.table(ftable(e$summary,e$Treatment),2),digits=2)
  </code></pre>
  
  <p>Which gives me my desired values:</p>
  
  <pre><code>                  A   B
  
  ,,              0.6 0.0
  MutA,MutB,      0.0 0.6
  MutA,MutB,MutC  0.0 0.4
  ,,MutC          0.4 0.0
  </code></pre>
  
  <p>Now I would like to include that in a Latex document via <code>xtable</code> and therefore need to change the rownames to exclude any comma at the beginning of a word. Ideally the output would look like:</p>
  
  <pre><code>                  A   B
  
  no Mut          0.6 0.0
  MutA,MutB,      0.0 0.6
  MutA,MutB,MutC  0.0 0.4
  MutC            0.4 0.0
  </code></pre>
  
  <p>I don't want to use the <code>rownames</code> command since my underlying dataset is changing and every week a lot of rows are added. Furthermore I am having more columns than posted here. Therefore I am looking for another way of achieving this outcome. Do you have any ideas?</p>