I am doing statistical analysis in R. I need to paste the results in a report written in French. In French, floating point numbers are written using a decimal comma instead of decimal point.
Manually replacing points by commas is a bit tedious...
1/ How may I have R print all my floating point numbers with a comma separating the integer and decimal parts ?
Many thanks to rmuc8 for having answered very quickly and effectively to this first question:
options(OutDec= ",")
This will yield e.g.
3.14
[1] 3,14
2/ How may I have R's sprintf("%.1f", x) doing the same ? e.g I'd like
sprintf("%.2f", 3.14)
to give the character string
[1] "3,14"
instead of
[1] "3.14"
Many thanks in advance for any help