title: Corresponding matrix construction
body: <p>I am working on linkage disequilibrium and the software output is like follows:
  <a href="https://i.stack.imgur.com/fgBCS.png" rel="nofollow noreferrer">Figure current</a></p>
  
  <p>what I actually want is the corresponding half of the matrix as well as 1 on the diagonals like this: 
  <a href="https://i.stack.imgur.com/JBbMV.png" rel="nofollow noreferrer">Figure anticipated</a></p>
  
  <p>I was wondering if this can be easily done in R or python? 
  Thanks for helping.</p>