title: Remove the maximum value of a vector in R
body: <p>I have a vector <code>v</code> and I want to remove the maximum value of the vector <code>v</code> from <code>v</code>. I can find that how many times each value repeated , but how can I remove maximum value of <code>v</code> from <code>v</code> in R?</p>
  
  <pre><code>v = c(0.25, 0.25, 0.3, 0.3, 0.3, 5, 6, 6.5, 8, 8, 8)
  max(v)
  [1] 8
  j = as.numeric(unname(table(v)))
  j
  [1] 2 3 1 1 1 3
  </code></pre>
  
  <p>Also, if I have another vector <code>a</code> which is </p>
  
  <pre><code>a = rep(1, length(v))
  </code></pre>
  
  <p>with same length as <code>v</code>, and I want to remove the last 3 ones , what should I do? </p>