title: How can I to leave NA in upper triangle matrix?
body: <p>I have the following dataframe</p>
  
  <pre><code>dt &lt;- data.frame(X=sample(5), Y=sample(5))
  dt &lt;- as.data.frame(as.matrix(dist(dt)))
  </code></pre>
  
  <p>I would like to replace <code>NA</code> with all enteries in <code>dt</code>. I know, how loops work, but I am looking for a better solution.</p>