title: pivot_wider from only two categories
body: <p>I have some <em>long</em> data, that I could like to <em>widen</em>. My initial data Looks lLike this</p>
  <pre><code>df &lt;- read.table(text = 'Item     Amount   
                            1000    10     
                            1000     1     
                            1500     5     
                            1500     2', 
                   header = TRUE)     
    
  library(tidyverse)
  </code></pre>
  <p>Now, I would like to <em>widen</em> it, using <a href="/questions/tagged/tidyr" class="post-tag" title="show questions tagged &#39;tidyr&#39;" rel="tag">tidyr</a>'s <code>pivot_wider()</code>,</p>
  <pre><code> df  %&gt;% 
   tidyr::pivot_wider(names_from = Item, values_from = Amount)
  
  # A tibble: 1 x 2
    `1000`    `1500`   
    &lt;list&gt;    &lt;list&gt;   
  1 &lt;int [2]&gt; &lt;int [2]&gt;
  Warning message:
  Values are not uniquely identified; output will contain list-cols.
  * Use `values_fn = list` to suppress this warning.
  * Use `values_fn = length` to identify where the duplicates arise
  * Use `values_fn = {summary_fun}` to summarise duplicates 
  </code></pre>
  <p>but I get some error I cannot resolve. What I expected was this, what am I doing wrong? I feel like I am overlooking something essential!</p>
  <pre><code>#&gt;     # A tibble: 1 x 2
  #&gt;       `1000`   `1500` 
  #&gt;       &lt;dbl&gt;    &lt;dbl&gt;
  #&gt;       10         1
  #&gt;        5         2
  </code></pre>