Multiply and replace values in data frame according to condition in R
问题 I'm new to R and I've been trying to multiply and replace certain values in my data frame with no success. Basically, what I want to do is that when a value from my df (any column) is 0 < x < 1, multiplicate it by 10 and then replace that value with the result of this equation. A glimpse to my df just in case... 'data.frame': 404 obs. of 15 variables: $ D3: num 16.1 17.1 16.1 16.1 17.2 ... $ TH : num 9.9 8.6 9.7 7.7 7.6 7.6 8.7 9.8 9.8 7.7 ... $ D2 : num 33.3 29.3 30.3 29.3 33.3 ... $ D1 :