title: I had a sparse matrix, when I open it in R, all elements which should be 0 are dots like ' . ', how can I convert it this dot to number 0?
body: <p>I had a sparse matrix, when I open it in R, all elements which should be 0 are dots like ' . ', how can I convert it this dot to number 0? That is converting it to numeric matrix that can be used in following calculation.</p>
  
  <p>I know a command to convert all the element which is NA to 0: that is </p>
  
  <pre><code>Mydata[is.na(Mydata)]&lt;-0
  </code></pre>
  
  <p>But I do not know how to convert dot to 0.</p>