title: Convert CSV data to a matrix to a heatmap in R
body: <p>Doing some visualizations for a paper I'm writing and am stuck in trasfering data from a CSV-loaded table to a matrix (to be able to plot a heatmap from it afterwards).</p>
  
  <p>I'm doing this:</p>
  
  <pre><code>dta.tesiscsv&lt;- read.csv("dtatesis.csv", header=TRUE)
  </code></pre>
  
  <p>to load a data sample that looks like this:</p>
  
  <pre><code>Col,Row,Kf
  1,1,100
  1,2,97.14285714
  2,1,100 
  ...,...,...
  </code></pre>
  
  <p>but am kind of lost on the next step (creating an empty matrix and transfering data from the table to it based on a formula):</p>
  
  <pre><code>X&lt;- matrix(nrow= 48, ncol=12)
  X[dta.test[,c(1:2)]] &lt;- dta.test$Kf
  </code></pre>