How can I specify, using one command, the number of digits displayed during an entire R session? That is to say, how can I get the value 0
to always display as 0.0
? I've tried the command options(digits=1)
, but 0
still displays as 0
and not 0.0
. I'm really trying to avoid wrapping each command in something like print(ifelse(x==0,"0.0",x))
.
It would also be nice if the solution to this problem made, say, 5
show up as 5.0
.
sprintf
-ing to a file.