title: Replacing every second comma in the string in R
body: <p>I have a string representing lat, long coordinates that is displayed like this:</p>
  
  <pre><code>30.538358,-96.692008,30.538602,-96.691741,30.539737,-96.690322
  </code></pre>
  
  <p>I need to replace every second comma with a <code>|</code></p>
  
  <pre><code>30.538358,-96.692008|30.538602,-96.691741|30.539737,-96.690322
  </code></pre>
  
  <p>I need this because the Google MAPS elevation service needs this format.</p>