title: Tidy dataset with pivot_longer: Multiple columns into two columns
body: <p>I everyone, </p>
  
  <p>I am currently learning R and trying to tidy up a dataset using pivot_longer() from the tidyverse package. </p>
  
  <p>I have this tibble </p>
  
  <pre><code>title               actor_1    actor_2    actor_3     actor_1_FB_likes actor_2_FB_likes actor_3_FB_likes
     &lt;chr&gt;               &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;                  &lt;dbl&gt;            &lt;dbl&gt;            &lt;dbl&gt;
   1 Avatar              CCH Pound… Joel Davi… Wes Studi               1000              936              855
   2 Pirates of the Car… Johnny De… Orlando B… Jack Daven…            40000             5000             1000
   3 The Dark Knight Ri… Tom Hardy  Christian… Joseph Gor…            27000            23000            23000
   4 John Carter         Daryl Sab… Samantha … Polly Walk…              640              632              530
   5 Spider-Man 3        J.K. Simm… James Fra… Kirsten Du…            24000            11000             4000
   6 Tangled             Brad Garr… Donna Mur… M.C. Gainey              799              553              284
  </code></pre>
  
  <p>I want to change it into the following format: </p>
  
  <pre><code>      title          actor_name    num_likes   
         &lt;chr&gt;            &lt;chr&gt;      &lt;dbl&gt;
       1 Avatar        CCH Pounder   1000
       2 Avatar        Joel David Moore    936
       2 Avatar        Wes Studi      855    
  </code></pre>
  
  <p>and so on... unfortunately I am stuck. 
  No matter what I try I somehow end up with something like this format: </p>
  
  <pre><code>title          actor_num actor_name       actor_likes      num_likes
     &lt;chr&gt;       &lt;chr&gt;     &lt;chr&gt;            &lt;chr&gt;                &lt;dbl&gt;
   1 Avatar      actor_1   CCH Pounder      actor_1_FB_likes      1000
   2 Avatar      actor_1   CCH Pounder      actor_2_FB_likes       936
   3 Avatar      actor_1   CCH Pounder      actor_3_FB_likes       855
   4 Avatar      actor_2   Joel David Moore actor_1_FB_likes      1000
   5 Avatar      actor_2   Joel David Moore actor_2_FB_likes       936
   6 Avatar      actor_2   Joel David Moore actor_3_FB_likes       855
   7 Avatar      actor_3   Wes Studi        actor_1_FB_likes      1000
   8 Avatar      actor_3   Wes Studi        actor_2_FB_likes       936
   9 Avatar      actor_3   Wes Studi        actor_3_FB_likes       855
  </code></pre>
  
  <p>My last attempt consisted of the following steps: </p>
  
  <pre><code>exercise8 &lt;- exercise8 %&gt;% pivot_longer(cols= actor_1:actor_3, names_to='actor_num', values_to='actor_name')
  exercise8 &lt;- exercise8 %&gt;% pivot_longer(cols= actor_1_FB_likes:actor_3_FB_likes, names_to='actor_likes', values_to='num_likes')
  </code></pre>
  
  <p>I can of course delete the columns actor_num and actor_likes but that would still not result in the desired format.</p>
  
  <p>Can anyone help? Am I starting completely wrong or is there a last step I am missing?
  Thank you in advance!</p>