How to replace numeric values of this dataframe:
df <- data.frame(num = 1:10, num2=-8:1, num3=2:11)
df <- as.matrix(df)
into cut labels?
df_categ <- cut(df, breaks = c(-Inf, 2, 4, Inf), labels=c("DOWN", "NORM", "UP"))
cut gives a list. But I need to substitute my numeric elements in the original df