I'd like to save some calculation outputs as a pdf, to incorporate with others in a document. I've tried pdf("filename") name_of_object_to_output dev.off() but it doesn't seem to work, appears that this pdf function is for graphics? Is there a way to output numerical objects to pdf? Thanks J Dr. Jim Maas University of East Anglia
I'm not sure about .pdf, but look at ?sink to create a text file. You could then print this as a .pdf if you so desired. Rob ------------------------------------------ Robert W. Baer, Ph.D. Professor of Physiology Kirksville College of Osteopathic Medicine A. T. Still University of Health Sciences 800 W. Jefferson St. Kirksville, MO 63501 660-626-2322 FAX 660-626-2965 -------------------------------------------------- From: "Maas James Dr (MED)" <J.Maas at uea.ac.uk> Sent: Wednesday, March 30, 2011 4:51 AM To: <r-help at r-project.org> Subject: [R] save ordinary numerical calculations as pdf> I'd like to save some calculation outputs as a pdf, to incorporate with > others in a document. I've tried > > pdf("filename") > name_of_object_to_output > dev.off() > > but it doesn't seem to work, appears that this pdf function is for > graphics? > > Is there a way to output numerical objects to pdf? > > Thanks > > J > > Dr. Jim Maas > University of East Anglia > > ______________________________________________ > 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. >
Henrique Dallazuanna
2011-Mar-30 13:29 UTC
[R] save ordinary numerical calculations as pdf
Take a look in ?Sweave On Wed, Mar 30, 2011 at 6:51 AM, Maas James Dr (MED) <J.Maas at uea.ac.uk> wrote:> I'd like to save some calculation outputs as a pdf, to incorporate with others in a document. ?I've tried > > pdf("filename") > name_of_object_to_output > dev.off() > > but it doesn't seem to work, appears that this pdf function is for graphics? > > Is there a way to output numerical objects to pdf? > > Thanks > > J > > Dr. Jim Maas > University of East Anglia > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 30/03/11 11:51, Maas James Dr (MED) wrote:> I'd like to save some calculation outputs as a pdf, to incorporate with others in a document. I've tried > > pdf("filename") > name_of_object_to_output > dev.off() > > but it doesn't seem to work, appears that this pdf function is for graphics? > > Is there a way to output numerical objects to pdf?Yes - there is an equivalent to the sink() which pute the results in a pdf, but I can not remember the name of the function. I know it does not help much, but at least I can tell you that there is such a function. Cheers, Rainer> > Thanks > > J > > Dr. Jim Maas > University of East Anglia > > ______________________________________________ > 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.- -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer at krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2TMzAACgkQoYgNqgF2egrATwCcCrcCfRBkj+Q8Cb+RddIlyfO6 Fg4An2RKwh0GoCRJJ0VJPt8GIQPTcl3B =GNAp -----END PGP SIGNATURE-----
The latex() function in the Hmisc package will typeset your objects. Embed that in a tex document and run pdflatex. Rich Sent from my iPhone On Mar 30, 2011, at 5:51, "Maas James Dr (MED)" <J.Maas at uea.ac.uk> wrote:> I'd like to save some calculation outputs as a pdf, to incorporate with others in a document. I've tried > > pdf("filename") > name_of_object_to_output > dev.off() > > but it doesn't seem to work, appears that this pdf function is for graphics? > > Is there a way to output numerical objects to pdf? > > Thanks > > J > > Dr. Jim Maas > University of East Anglia > > ______________________________________________ > 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.
Hi, If you want grid graphics: For data.frames and matrices, gridExtra has a grid.table() function. For strings (paragraph), Rgraphics has a function too, whose name i forget. It could be possible to combine the two and define a method to display lists as well. HTH, baptiste On 30 March 2011 22:51, Maas James Dr (MED) <J.Maas at uea.ac.uk> wrote:> I'd like to save some calculation outputs as a pdf, to incorporate with others in a document. ?I've tried > > pdf("filename") > name_of_object_to_output > dev.off() > > but it doesn't seem to work, appears that this pdf function is for graphics? > > Is there a way to output numerical objects to pdf? > > Thanks > > J > > Dr. Jim Maas > University of East Anglia > > ______________________________________________ > 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. >