How to format zero values in R using prettyNum and zero.print
I would like prettyNum to handle zero values differently; for example, instead of printing "0", have it print "<0.01". I have been looking at 开发者_开发技巧the zero.print option but have only managed to get it print a single character. If for example you set zero.print="abc", only "a" will get printed (instead of "0").
Can you please let me know how to solve this problem? Or perhaps, prettyNum and zero.print it's not the way to go?
Thank you.
What about using:
print(ifelse(n==0, "<0.05", n))
zero.print seems to accept only 1 character (although the help file talks about "character string"...)
加载中,请稍侯......
精彩评论