title: gsub() in R is not replacing '.' (dot)
body: <p>I want to replace dots in <code>"2014.06.09"</code> to <code>"2014-06-09"</code>. I am using <em>gsub()</em> function for it. If </p>
  
  <pre><code>x &lt;-  "2014.06.09"
  gsub('2', '-' ,x)
  # [1] "-014.06.09"
  </code></pre>
  
  <p>But when I try </p>
  
  <pre><code>gsub('.', '-', x)
  # [1] "----------"
  </code></pre>
  
  <p>instead of <code>"2014-06-09"</code>.</p>
  
  <pre><code>class(x)
  # "character"
  </code></pre>
  
  <p>Can some suggest me a way to get this right and also why it is not working for <code>'.'</code> (dot)</p>