How can I insert actual values in dataframe as columns in R? : <p>I know some basic R but I'm stuck with this dataframe handling.
I need to be able to use a package or base function in R to transoform a dataframe like this.</p>

<pre><code>id   value    variable 
1    25.5     max_temp
1    16.4     min_temp
2    23.1     max_temp 
3    12.1     min_temp
</code></pre>

<p>into this:</p>

<pre><code>id   max_temp    min_temp
1     25.5        16.4
2     23.1         NA
3     NA           12.1
</code></pre>

<p>Check the NA example as some observations have missing measurements.
Actually I can fix it directly in excel file but I'm trying to do preprocessing less manually.</p>

<p>Thanks.</p>
