title: breaks are not unique when used bin.var function in R
body: <p>I have this portion of dataframe (dfPancan2):</p>
  
  <pre><code>  -0.00616222 3.0501945 4.135684 
    -0.00616222 1.6888945 2.902784
    -0.00616222 1.6214945 2.621384
    -0.00616222 1.5550945 2.315284
    -0.00616222 1.4541945 2.286884
    -0.00616222 1.2254945 2.155184
    -0.00616222 1.2177945 2.068584
    -0.00616222 1.2092945 1.958784
  ... ... ...
  </code></pre>
  
  <p>when I used this function:</p>
  
  <pre><code>dfPancan2$variable &lt;-
    with(dfPancan2,
         bin.var(
           dfPancan2[c(1:nrow(dfPancan2)), 1],
           bins = 3,
           method = 'proportions',
           labels = c('D', 'M', 'UP')
         ))
  </code></pre>
  
  <p>it would get the following dataframe:</p>
  
  <pre><code>  -0.00616222 3.0501945 4.135684 UP
    -0.00616222 1.6888945 2.902784 UP
    -0.00616222 1.6214945 2.621384 UP
    -0.00616222 1.5550945 2.315284 M
    -0.00616222 1.4541945 2.286884 M
    -0.00616222 1.2254945 2.155184 D
    -0.00616222 1.2177945 2.068584 D
    -0.00616222 1.2092945 1.958784 D
  ... ... ...
  </code></pre>
  
  <p>But it got an error message:</p>
  
  <pre><code>Error in cut.default(x, quantile(x, probs = seq(0, 1, 1/bins), na.rm = TRUE),  : 
    the 'breaks' are not distinct
  </code></pre>
  
  <p>the error I guess is due to the constancy of the first column</p>
  
  <p>Any solutions?</p>
  
  <p>Thank you</p>