title: Replace all values lower than threshold in R
body: <p>I have a vector</p>
  
  <pre><code>x &lt;- c(-1, 0, 1, 2, 3)
  </code></pre>
  
  <p>I want all values less than 1 to be replaced by 1.</p>
  
  <p>How?</p>
  
  <p><em>Is there a no-loop solution?</em></p>