Let's say I have a numeric vector that specifies acceptable range for an input is 1:4.
In the EXamples below, how can I obtain my desired_output?
acceptable = 1:4
# EX 1:
input = 0:7
desired_output = 1:4
# EX 2:
input = 6
desired_output = 4