[R] placing objects with format statements into text file

Patrick McKnight pem at theriver.com
Thu Apr 18 00:26:59 CEST 2002


Greetings,

Is there a way to explicitly state the format statement for each object
in a write statement?  For example, I have data frame with four
variables (SSN that is 11 characters, and three other variables with
values ranging between 0 and 10).  I would like to have a text file
written that preserves a specific formatting.  Specifically, I would
like the following result:

129-02-1102 1 3 4 5
123-45-345610 9 810
etc.

As you can see, the SSN takes up only 11 columns and the other four
variables are formated with no seperator but are "put" there with the
format statement of f2.0.  So, is there a way to accomplish this in R? 
If so, I would be extremely greatful for direction.


-- 
Cheers,

Patrick
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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