danwwilson :rstats:danwwilson@rstats.me
Jul 3, 2025, 5:24 AM#rstats just a little quirk discovered. `round(c(2.5, 3.5))` what do you think you should get?
#rstats just a little quirk discovered. `round(c(2.5, 3.5))` what do you think you should get?
@danwwilson R's banker's rounding (gosh darn bankers) bit me on way more than one occasion. (`ceiling()` / `floor()` IMO defines intent better anyway)
@hrbrmstr Yeah, I’ve been using R for 10+ years and had never heard of it before. Clearly I did NOT read the manual.
@danwwilson not using R for 10 days sounds like nightmare fuel for me tbh 🙃
@danwwilson This from the help: ‘round(0.15, 1)’ could be either ‘0.1’ or ‘0.2’)