title: Replace space between two words with an underscore in a vector
body: <p>I have words, Genus species, and I want an underscore to replace the space between the two strings in R</p>
  
  <p>Input:</p>
  
  <pre><code>&gt;data$species
  Genus species
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>&gt;data$species
  Genus_species
  </code></pre>