title: R - C++ code reproduction in Rcpp Math.Min issue
body: <p>I am trying to reproduce a <code>C++</code> code that I found <a href="https://rosettacode.org/wiki/Levenshtein_distance#C.2B.2B" rel="nofollow">here</a> about the <code>LevenshteinDistance</code>. </p>
  
  <p>More precisely, I am trying to reproduce the part starting by </p>
  
  <pre><code>static int LevenshteinDistance(string s, string t)
  </code></pre>
  
  <p>until </p>
  
  <pre><code>  return d[n, m];
   }
  </code></pre>
  
  <p>However, I am experiencing an error with <code>Math.Min(Math.Min(</code>. I am not sure what is the translation in <code>rcpp</code>. I tried with <code>min</code> but it doesn't seem to work. Any clue ? </p>
  
  <pre><code>// [[Rcpp::export]]
  NumericVector LevenshteinDistance(NumericVector s, NumericVector t) {
      int n = s.size();
      int m = t.size();
      NumericMatrix d(n+1, m+1);
  
      if (n == 0)
      {
        return m;
      }
  
      if (m == 0){
        return n;
      }
  
      for (int i = 0; i &lt; n; i++)
        d(i, 0) = i;
      for (int j = 0; j &lt; m; j++)
        d(0, j) = j;
  
      for (int j = 1; j &lt; m; j++)
        for (int i = 1; i &lt; n; i++)
          if (s(i - 1) == t(j - 1))
            d(i, j) = d(i - 1, j - 1);  //no operation
          else
              d(i, j) = min(
              d(i - 1, j) + 1,    //a deletion
              d(i, j - 1) + 1),   //an insertion
              d(i - 1, j - 1) + 1 //a substitution
          );
          return d(n, m);
    }
  </code></pre>
  
  <p>So with </p>
  
  <pre><code>d(i, j) = min(
  </code></pre>
  
  <p>I get this error message : <code>no matching function</code>. </p>