[R] round and trailing zero

Jorgen Harmse JH@rm@e @end|ng |rom roku@com
Tue Jul 30 17:09:21 CEST 2024


Duncan Murdoch answered your question, but I have another. Are you going to do some computation with the rounded numbers, or are they just for display? (One thing I like about Excel is that I can change the display format of a cell without changing answers that depend on that cell.) In the latter case, why stash them in a variable? For more control of the display, consider sprintf (or a wrapper that combines sprintf with cat).

Regards,
Jorgen Harmse.


	[[alternative HTML version deleted]]



More information about the R-help mailing list