Wiindows XP R 2.7 I am using sink() to send the results of my analyses to a text file. Unfortunately my graphs do not become part of the file. Is there anyway that I can have both the text and graphic output of my analyses appear in a file? Thanks, John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) Confidentiality Statement: This email message, including any attachments, is for th...{{dropped:6}}
Richard.Cotton at hsl.gov.uk
2008-Dec-05 15:42 UTC
[R] Sink does not send graphs to sink file
> I am using sink() to send the results of my analyses to a text file. > Unfortunately my graphs do not become part of the file. Is there > anyway that I can have both the text and graphic output of my > analyses appear in a file?You can create a latex document with text, graphs and R-code using ?Sweave. If you prefer to write to Open document format , there is an Odfweave package. The other alternative is simply writing your graphs to files (or one file with all the graphs), e.g. pdf("test.pdf") plot(1:10) hist(rnorm(100)) dev.off() Regards, Richie. Mathematical Sciences Unit HSL ------------------------------------------------------------------------ ATTENTION: This message contains privileged and confidential inform...{{dropped:20}}
> I am using sink() to send the results of my analyses to a text > file. Unfortunately my graphs do not become part of the file. > Is there anyway that I can have both the text and graphic > output of my analyses appear in a file?Well, how would you expect the graphs to be represented in a text file? So the short answer is no you can't do that. The longer and probably more helpful answer is: Have a look at Sweave(). Sweave is a system which allows you to integrate R-code with LaTeX formatting -- including the possibility to insert graphs. cu Philipp -- Dr. Philipp Pagel Lehrstuhl f?r Genomorientierte Bioinformatik Technische Universit?t M?nchen Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://mips.gsf.de/staff/pagel
Others mentioned Sweave, which is the best way to go if you have a planned set of routines to do. If you are more just playing and want a transcript of what you are doing (unpreplanned) that includes graphics in the final version, then look at etxtStart from the TeachingDemos package. You will need to postproccess the file using enscript (and optionally ps2pdf), but then you will end up with a file including both the text and the graphics. Note: using the current version (new one due soon) with R2.8 generates some warnings that can be ignored. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of John Sorkin > Sent: Friday, December 05, 2008 8:15 AM > To: r-help at r-project.org > Subject: [R] Sink does not send graphs to sink file > > Wiindows XP > R 2.7 > I am using sink() to send the results of my analyses to a text file. > Unfortunately my graphs do not become part of the file. Is there anyway > that I can have both the text and graphic output of my analyses appear > in a file? > Thanks, > John > > John David Sorkin M.D., Ph.D. > Chief, Biostatistics and Informatics > University of Maryland School of Medicine Division of Gerontology > Baltimore VA Medical Center > 10 North Greene Street > GRECC (BT/18/GR) > Baltimore, MD 21201-1524 > (Phone) 410-605-7119 > (Fax) 410-605-7913 (Please call phone number above prior to faxing) > > Confidentiality Statement: > This email message, including any attachments, is for > th...{{dropped:6}} > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.
John Sorkin wrote:> Wiindows XP > R 2.7 > I am using sink() to send the results of my analyses to a text file. Unfortunately my graphs do not become part of the file. Is there anyway that I can have both the text and graphic output of my analyses appear in a file? >Hi John, Both htmlize in the prettyR package and the functions in the R2HTML package will format the output of an R session in HTML. The results can be displayed in any (graphical) HTML browser. Jim
Possibly Parallel Threads
- data structure with coefficients, and call from lm()
- Recalling and printing multiple graphs. Is there something in the HISTORY menu that will help?
- Problem having tick marks aligned when plotting three graphs on top of one another.
- Page eject and clearing the console
- using apply to a data frame