options(OutDec=",") val = 0.86771 sprintf("%.3f", val) #[1] "0.868"
options(OutDec=",")
val = 0.86771
sprintf("%.3f", val)
#[1] "0.868"