title: Tranform a matrix of distances into a vector of attributes
body: <p>I am trying to reverse the process presented <a href="https://stackoverflow.com/questions/46956248/transform-attribute-vector-into-a-matrix-with-differences-of-elements">here</a>.
  Specifically, I need to go back to the original vector that generated a matrix of absolute distances between elements.</p>
  
  <p>For example I have a NxN matrix named A (with people names on rows and columns), where each cell Aij has the value of |age_i-age_j|, representing the absolute difference in age between the two people i and j. I need to convert this matrix into a vector which reports the age of this N people.</p>
  
  <p>The matrix could be:</p>
  
  <pre><code>A = matrix( c(0, 5, 42, 5, 0, 37, 42, 37, 0), nrow=3, ncol=3, byrow = TRUE) 
  </code></pre>
  
  <p>and i want to transform it into this vector:</p>
  
  <pre><code>tmp &lt;- c(18, 23, 60) 
  </code></pre>
  
  <p>To go from the vector to the matrix I would have used this command:</p>
  
  <pre><code>A &lt;- abs(outer(tmp, tmp, "-"))
  </code></pre>
  
  <p>what I'm trying to do is to reverse the process.</p>