title: How to replace numeric values in a dataframe by categorical labels in R?
body: <p>How to replace numeric values of this dataframe:</p>
  <pre><code>df &lt;- data.frame(num = 1:10, num2=-8:1, num3=2:11)
  df &lt;- as.matrix(df)
  </code></pre>
  <p>into cut labels?</p>
  <pre><code>df_categ &lt;- cut(df, breaks = c(-Inf, 2, 4, Inf), labels=c(&quot;DOWN&quot;, &quot;NORM&quot;, &quot;UP&quot;))
  </code></pre>
  <p>cut gives a list. But I need to substitute my numeric elements in the original df</p>