title: Finding the vector with minimal integers that keeps the ratio in R
body: <p>I'm looking for a function that works for lists or vectors that "normalize" their values in a way that:
  1) Finds the minimal integer values of the elements
  2) Keeps the source ratio between elements.</p>
  
  <p>For instance:</p>
  
  <pre><code>(0.25,0.25,0.5) -&gt; (1, 1, 2)
  (0.3, 0.3, 0.4) -&gt; (3, 3, 4)
  (1/2, 1/3, 1/6) -&gt; (2, 3, 6)
  
  ...
  </code></pre>
  
  <p>We can assume that the source vector elements sum to 1.
  In addition, the number of elements in the vector is not limited.
  Can GCD (Greatest Common Divisor) or LCD function help in this case?</p>