[R] how to write text into a file
Xirui Yang
xirui at cs.tu-berlin.de
Thu May 8 22:04:26 CEST 2003
Thank you, James, Roger and Jerome,
There is a long story...
I'm a computer science student (not statistician). About two year ago, I
was in a project "Survey and Analysis through WAP", which collects survey
datas via WAP. The customers may get the latest result per internet. A
survey may include many questions of different types. Statistics write R
programm in a .r file for each survey, which may contain many R commands.
Every time when a customer want to see the latest result, the R programm
file will be called and result files (a postscript file and a pdf file)
will be generated.
We have found that the command postscript() puts the graphics into a
postscript file. With the command text(), text may be added into graphics.
But the text ouput of commands like
max(), median()... will only be put on the screen. The result files
contain pages of graphics and no text!
And why do I ask this question today? I am taking on this term another
lecture "Decentral System Design". The students should take part in an
open source project, design a prototype and write code for it. I remember
that R-Project is an open source project. My group member and I think that
we may write a command for the R-Project to put the text ouput into a
postscript file, if there is not yet one.
best wishes,
Xirui
On Thu, 8 May 2003, Jerome Asselin wrote:
>
> I'd suggest to write your text into a text file. See ?cat . In particular,
> look at the "file" option.
>
> I wonder why you want to have your text in a postscript file rather than
> a text file. However, you can probably convert your text file using some
> utility of your OS. E.g., you could print it to a ps file instead of a
> printer.
>
> HTH,
> Jerome
>
> On May 8, 2003 09:45 am, Xirui Yang wrote:
> > Hello,
> >
> > Would somebody tell me how to write the text result into a postscript
> > file? The command postscript() sents only the graphics output into
> > PostScript files.
> >
> > best wishes,
> > Xirui
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
>
More information about the R-help
mailing list