title: create heat map from PCA coordinates in R
body: <p>I'd like to create a heat map on one variable against itself. However, I don't have it in matrix format. I have the PCA1 and PCA2 coordinates of each item and I'd like to know how I can create a heat map out of this. This is what my data looks like (where cluster is a k-means cluster classification)</p>
  
  <pre><code>ID                     PCA1             PCA2          cluster
  echocardiography       -0.88            0.87          9
  infarction             -0.18            0.57          7
  carotid                1.13             -0.80         2
  aorta                  -0.03            -0.06         5
  myocardial             -0.72            -0.02         3
  hemorrhage             0.23             -0.67         5
  </code></pre>
  
  <p>so basically I want a heat map between the IDs that shows (by possibly using PCA coordinate distance) how correlated each ID is.</p>
  
  <p>note: the heat map should look something like this (vs a density heat plot):
  <a href="https://i.stack.imgur.com/6ZviK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6ZviK.jpg" alt="enter image description here"></a></p>