[R] round and trailing zero

Göran Broström gb @end|ng |rom eh@r@@e
Tue Jul 30 20:55:11 CEST 2024



Den 2024-07-30 kl. 17:09, skrev Jorgen Harmse:
> Duncan Murdoch answered your question, but I have another. Are you
> going to do some computation with the rounded numbers, 

Wouldn't dream of it.

> or are they just for display? 

Yes.

G,

> (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.
>



More information about the R-help mailing list