Answers.Body: <p>This should work:</p>
  
  <pre><code>mut<span class="math-container">$chr &lt;- paste("chr", mut$</span>chr, sep = "")
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-31T22:13:26.517Z
Answers.Text: if you use *paste0* instead of *paste*, you can omit the 'sep=""'
Answers.UserDisplayName: gringer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-31T17:57:27.563Z
Answers.LastActivityDate: 2019-03-31T18:02:45.357Z
Answers.LastEditDate: 2019-03-31T18:02:45.357Z
Answers.UserDisplayName: h3ab74
Body: <p>I have this dataframe </p>
  
  <pre><code>&gt; head(mut)
    sample chr     pos ref alt
  1  t_005   1  928006   G   A
  2  t_005   1 1649842   G   T
  3  t_005   1 2020408   G   A
  4  t_005   1 2031677   T   A
  5  t_005   1 2901878   G   A
  6  t_005   1 3039338   G   A
  &gt;
  </code></pre>
  
  <p>How I can add <code>"chr"</code> to the <code>chr</code> column? I mean, instead of <code>"1"</code> I want <code>"chr1"</code>, etc.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-01T09:21:33.187Z
Comments.Text: This is basic R question and more suitable to StackOverflow main site, and it is already has been asked many times, see [here for example](https://stackoverflow.com/q/24055308/680068)
Comments.UserDisplayName: zx8754
Tags: <r>
Title: Adding a string to start of one column
ThreadText: # Adding a string to start of one column
  
  (Asked by: username_0 on 2019-03-31)
  
  I have this dataframe
  
  ```
  > head(mut)
    sample chr     pos ref alt
  1  t_005   1  928006   G   A
  2  t_005   1 1649842   G   T
  3  t_005   1 2020408   G   A
  4  t_005   1 2031677   T   A
  5  t_005   1 2901878   G   A
  6  t_005   1 3039338   G   A
  >
  
  ```
  
  How I can add `"chr"` to the `chr` column? I mean, instead of `"1"` I want `"chr1"`, etc.
  
  **Tags:** r
  
  > **Comments:**
  > **username_1**: This is basic R question and more suitable to StackOverflow main site, and it is already has been asked many times, see [here for example](https://stackoverflow.com/q/24055308/680068)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-03-31. Score: 5 | Accepted answer
  
  This should work:
  
  ```
  mut$chr <- paste("chr", mut$chr, sep = "")
  
  ```
  
  > **Comments:**
  > **username_3**: if you use *paste0* instead of *paste*, you can omit the 'sep=""'  
  
  ---
  
  