title: dplyr: how to use mutate function to make a key combining a prefix string and a sequence of values
body: <p>Working on a 4 rows data.frame object with dplyr, I want to created a new "id" column combining a prefix string and a sequence of values.</p>
  
  <p>What I expected:</p>
  
  <pre><code> columnA|columnB|columnC|id
   data    data    data    id-1
   data    data    data    id-2
   data    data    data    id-3
   data    data    data    id-4
  </code></pre>
  
  <p>What I tried:</p>
  
  <pre><code> library (dplyr)
   y &lt;- x %&gt;%
          mutate (id =  "id- " &amp; seq(from = 1, to =4, by = 1))
  </code></pre>