For instance I have a vector:
x <- c(6, 22, 18, 5, 19, 14, 17, 88,30, 0, -1, 2, 3)
How do I check for values lesser than 17 and change the values to value + some const
?
something like this:
x[x < 17] <- lesser vaue + 18
expected output:
c(24, 22, 18, 23, 19, 32, 17, 88,30, 18, 17, 20, 21)