title: Create a Correlation Matrix From a Correlation Vector in R
body: <p>I want to create a correlation matrix given the correlation vector, which is the upper (or lower) triangular matrix of the correlation matrix.</p>
  
  <p>The goal is to transform this vector</p>
  
  <p><img src="https://i.stack.imgur.com/3V2H1.png" alt="enter image description here"></p>
  
  <p>to this correlation matrix with 1s on the diagonal.</p>
  
  <p><img src="https://i.stack.imgur.com/ud3fI.png" alt="enter image description here"></p>
  
  <p>Do you know if there is a method creating a matrix given the triangular above the diagonal and to set the diagonal to 1?</p>