Skip to content
Prev 218839 / 398500 Next

unexpected result from format(x, digits)

Follow-up: You can strip the quotation marks from the output,
if you want, by wrapping the formatC() command in cat().
Example:

  formatC(X,3,format="f")
  # [1] "1.865" "0.405" "0.147" "1.731" "0.090"
  cat(formatC(X,3,format="f"),"\n")
  # 1.865 0.405 0.147 1.731 0.090

Ted.
On 28-Apr-10 22:12:56, Ted Harding wrote:
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 28-Apr-10                                       Time: 23:20:31
------------------------------ XFMail ------------------------------