I am trying to use
match() in R to find any matching values within a certain interval. For example:
v <- c(2.2, 2.4, 4.3, 1.3, 4.5, 6.8, 0.9) match(2.4, v)
gives me all the locations where 2.4 occurs in
v, but what if I wanted to give a range for all possible matches? For example 2.4 +/- 0.2?
Any help is greatly appreciated, thanks in advance!