I have a vector like this:
> seq(157.5,180.5,1)
> [1] 157.5 158.5 159.5 160.5 161.5 162.5 163.5 164.5 165.5 166.5 167.5 168.5 169.5 170.5 171.5 172.5 173.5 174.5 175.5 176.5 177.5 178.5 179.5 180.5
l would like to round any decimal number within this range to the nearest number (floor) in this vector. For example:
> round(165.28)=164.5
Is there any idea how to do it?