title: Trouble transforming a data set in R; making a look up table
body: <p>R (programming language) </p>
  
  <p>I would like to transform my data set that has sample numbers, treatment days and concentrations (variable); to set it up as a single matix where the cells are filed with only concentration values. My output is a lookup table, where the user can look up a sample number along the 1st row and a day along the first column (header), and follow these along to get a concentration.</p>
  
  <p>This is not my data set (it comes as a matrix), however I quickly made these three for the example.</p>
  
  <pre><code>Samplenb - &lt; c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4)
  Day &lt;- c(1,5,10,15,1,5,10,15,1,5,10,15,1,5,10,15)
  Concentration &lt;- c(0.2, 0.3, 0.5, 0.9,0.2, 0.3, 0.5, 0.9,0.2, 0.3, 0.5, 0.9,0.2, 0.3, 0.5, 0.9)
  </code></pre>
  
  <p>Any help it much appreciated. I have been playing around with the reshape package functions. However, they do not seem suitable. </p>
  
  <p>Thank you for taking the time to help me!</p>