If this is for printing purposes, sprintf is what you are after:
> sprintf("%.3f", round(5.2,3))
[1] "5.200"
See ?sprintf for formatting details.
If this is for printing purposes, sprintf is what you are after:
> sprintf("%.3f", round(5.2,3))
[1] "5.200"
See ?sprintf for formatting details.