title: Calculate probability for two discrete variables in R
body: <p>So, I have something like:</p>
  
  <pre><code>V1 V2
  X  B
  Y  A
  X  A
  Y  B
  X  B
  X  B
  </code></pre>
  
  <p>And I need:</p>
  
  <pre><code>    A     B
  X  0.17  0.5
  Y  0.17  0.17
  </code></pre>
  
  <p>*Note: They do not sum up to 1 because I round <code>1.666</code> to <code>1.7.*</code></p>