问题
My data look like below. I want to select value greater/equal to 35 and less than/equal to 350. I also want to replace those values with withinrange
value
1
35
36
37
350
355
3555
35555
回答1:
To select the values: value[value >= 35 & value <=350]
To replace them with withinrange
: value[value >= 35 & value <=350] <- withinrange
来源:https://stackoverflow.com/questions/44954507/find-value-within-a-range-in-r