pub fn format_r_double(f: f64) -> String
Format an f64 the way R does (integer-valued doubles without decimal point, Inf, NaN, etc.)