[R] dput

Prof Brian D Ripley ripley at stats.ox.ac.uk
Thu May 4 21:44:18 CEST 2000


On Thu, 4 May 2000, Song Qian wrote:

> I have two questions regarding the use of function
> dput().  I am using R (v1.0.1) to create input files
> for WinBUGS.
> 
> First, I would like to have the output data round to
> the specified decimal places.  I used function
> round().  However, occasionally, dput() will write
> 0.0005 as 5e-4.  Is there a way to correct this?

What need `correct'ion? They are the same thing!

> Second, when writing a matrix, the resulting output is
> in the form:
> 
> structure(c(0, 1, ...), .Dim=c(2,3))
> 
> Is it possible to have the same output format as in 
> Splus:
> 
> structure(.Data=c(0, 1, ...), .Dim=c(2,3))

Not easily.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list