Hi guys a very simple question.
How can I replace values < 1.5 and the values > -1.5 with 0 in a data.frame?
Should be "pipe" the best solution?
Thanks a lot!
E.
It’s as simple as this:
data[data > -1.5 & data < 1.5] <- 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With