title: R programming, How do I account for repetitions when order doesn't matter when comparing two samples?
body: <p>For example a two player board game allows the players to roll 3 dice, what is the probability that they roll the same values, ignoring the order, but accounting for repetitions?.  Such as (8,2,2) is the same as (2,8,2).  I'm not sure that we can use <code> identical()</code> and I attempted the use of <code>any()</code> too, but I am not getting the answer I need.  (which is around 2.1% or 2.2%).  Also we cant use Ifs/whiles</p>
  <pre><code>game &lt;- function(){
    
    a &lt;- sample(1:6,3, replace = T)
    #print(a)
    
    b &lt;- sample(1:6,3, replace = T)
    #print(b)
    
    identical(any(a[a]),any(b[b]))
    
  }
  
  mean(replicate(10000, game() ))
  
  
  </code></pre>