title: How to fill a matrix with zero (0)
body: <p>I need to fill matrix distances with 0. How can I do this?</p>
  
  <pre><code>distances &lt;- matrix(1:25, nrow=5, ncol=5)
  apply(distances, c(1, 2), function(x) 0)
  </code></pre>