I'm stuck in the unenviable position of attempting to replicate a MS Access function called Cint inside of R. The way Cint works is that anything less than or equal to 1.5 is rounded down.
- Cint(1.5) = 1
- Cint(1.5000000001) = 2
- Cint(1.4999999) =1
https://www.techonthenet.com/access/functions/datatype/cint.php
More sensibly base R rounds 1.5 up to 2.
- round(1.5) = 2
How do I coerce R to round data following Cint's rules? In this case being consistent is preferable to accuracy.