title: Pivot_longer on integer and factor
body: <p>I have a dataset that looks like the following.</p>
  
  <pre><code># A tibble: 1 x 4
    hhm1q001 hhm2q001 hhm1q002 hhm2q002
    &lt;chr&gt;    &lt;chr&gt;    &lt;int&gt;    &lt;int&gt;   
  1 blue     red      30       50 
  </code></pre>
  
  <p>I have been trying to transform it to long using  <code>tidyr::pivot_longer</code>
  my expected output looks like this:</p>
  
  <pre><code>  hhm   q001  q002 
    &lt;int&gt; &lt;chr&gt; &lt;int&gt;
  1 1     blue  30   
  2 2     red   50
  </code></pre>
  
  <p>I have tried the following code </p>
  
  <pre><code>HHS_long &lt;- pivot_longer(HHS_all, 
                           cols= starts_with("hhm"), #identifies the column from which to go from wide to long
                           names_to = ("hhm"), #name(s) of new column(s) created from cols= 
                           values_drop_na = FALSE
  )
  head(HHS_long)   
  </code></pre>
  
  <p>Unfortunately i get the following error 
  <code>.Error: No common type for hhm1q101 &lt;factor&lt;b5064&gt;&gt; and hhm1q102 &lt;integer&gt;.</code></p>
  
  <p>Not sure how to go around this, i get they are not the same class, but i have quite a lot of variable in the dataset and they are definitely of a different class.
  Hope this is the correct format to posting.</p>
  
  <p>Thanks for any help</p>