title: how to Count the values frequency of 2 rows in R
body: <p>I have a table like this : </p>
  
  <pre><code>Menu name | Transcode
  Menu 1    | a1
  Menu 2    | a2
  Menu 3    | a3
  Menu 1    | a1
  Menu 3    | a2
  Menu 1    | a1
  Menu 1    | a3
  </code></pre>
  
  <p>How can I achieve this pivot in R. to count the number of values frequency in column x (menu name) and the frequency of column y (Trancode) in relation with column x</p>
  
  <p><a href="https://i.stack.imgur.com/LADyb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LADyb.png" alt="enter image description here"></a></p>