[R] Option to Print with numbers formatted

Santosh Srinivas santosh.srinivas at gmail.com
Fri Nov 19 15:59:22 CET 2010


Hello group,

I have a data frame called test.df  with a bunch of columns. 

When I do a print(test.df), I want the numbers to appear a pre-defined
setting.

I believe this can be achieved by sprintf but this needs to be done
individually for the data.

However, is there an option that I can set so that all numerical values
default to comma separated, 2 decimal places when they appear?

Thanks,
S



More information about the R-help mailing list