Skip to content

dput

2 messages · Song Qian, Brian Ripley

#
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?

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))

Thanks in advance.




=====
Song Qian	
Assistant Professor
Environmental Sciences and Resources
Portland State University
Portland, OR 97207-0751
http://web.pdx.edu/~qians

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 4 May 2000, Song Qian wrote:

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