From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: babel: textual output and graphic results Date: Fri, 24 Jun 2011 14:28:41 +0200 Message-ID: References: <87y60rpmjc.fsf@gmail.com> <87iprvph8y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3005dee87f48f504a6745757 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa5V7-00063O-JU for emacs-orgmode@gnu.org; Fri, 24 Jun 2011 08:28:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qa5V5-0004Yh-H8 for emacs-orgmode@gnu.org; Fri, 24 Jun 2011 08:28:45 -0400 Received: from mail-qy0-f169.google.com ([209.85.216.169]:63603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa5V5-0004YM-4Q for emacs-orgmode@gnu.org; Fri, 24 Jun 2011 08:28:43 -0400 Received: by qyk32 with SMTP id 32so340248qyk.0 for ; Fri, 24 Jun 2011 05:28:41 -0700 (PDT) In-Reply-To: <87iprvph8y.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eythan Weg , emacs-orgmode --20cf3005dee87f48f504a6745757 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Jun 24, 2011 at 2:05 PM, Eythan Weg wrote: > > > > Thank you. True. But, I would like, if possible, to have the link to > the saved plot as a link in the output, for free. > Just add it as a cat() statement: #+begin_src R :results output :session print(seq(1,10)) pdf("ThePlot.pdf") plot(seq(1,10)) dev.off() cat("[[./ThePlot.pdf]]") #+end_src > Eythan > > > Rainer M Krug > Fri, 24 Jun 2011 13:18:36 +0200 > > On Fri, Jun 24, 2011 at 12:10 PM, Eythan Weg > wrote: > > > Hi, > > How could I effect the plot saved in a file and the output > produced > shown in the buffer by using a single execution of R in the > following > snippet? > > > > Why not the old R way: > > #+begin_src R :results output :session > print(seq(1,10)) > > pdf("ThePlot.pdf") > > plot(seq(1,10)) > > dev.off() > > #+end_src > > > Rainer > > > Thank you. > Eythan > > > > > > > -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation > Biology, UCT), Dipl. Phys. (Germany) > > Centre of Excellence for Invasion Biology > Stellenbosch University > South Africa > > Tel : +33 - (0)9 53 10 27 44 > Cell: +33 - (0)6 85 62 59 98 > Fax (F): +33 - (0)9 58 10 27 44 > > Fax (D): +49 - (0)3 21 21 25 22 44 > > email: Rainer@krugs.de > > Skype: RMkrug > -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug --20cf3005dee87f48f504a6745757 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Fri, Jun 24, 2011 at 2:05 PM, Eythan = Weg <eythanweg@= gmail.com> wrote:



Thank you. =A0True. =A0But, I would like, if possible, to have the link to<= br> the saved plot as a link in the output, for free.

=
Just add it as a cat() statement:

=A0#+= begin_src R :results output :session
print(seq(1,10))
pdf("ThePlot.pdf")=A0
plot(seq(1,10))
dev.off= ()=A0
cat("[[./ThePlot.pdf]]")
#+end_src


Eythan


Rainer M Krug <r.m.krug@gmail.com<= /a>>
Fri, 24 Jun 2011 13:18:36 +0200

=A0 On Fri, Jun 24, 2011 at 12:10 PM, Eythan Weg <
eythanweg@gmail.com>
=A0 wrote:


=A0 =A0 =A0 Hi,

=A0 =A0 =A0 How could I effect the plot saved in a file and the output
=A0 =A0 =A0 produced
=A0 =A0 =A0 shown in the buffer by using a single execution of R in the =A0 =A0 =A0 following
=A0 =A0 =A0 snippet?



=A0 Why not the old R way:

=A0 =A0 =A0 #+begin_src R :results output :session
=A0 =A0 =A0 print(seq(1,10))

=A0 pdf("ThePlot.pdf")

=A0 =A0 =A0 plot(seq(1,10))

=A0 dev.off()

=A0 =A0 =A0 #+end_src


=A0 Rainer


=A0 =A0 =A0 Thank you.
=A0 =A0 =A0 Eythan






=A0 --
=A0 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
=A0 Biology, UCT), Dipl. Phys. (Germany)

=A0 Centre of Excellence for Invasion Biology
=A0 Stellenbosch University
=A0 South Africa

=A0 Tel : +33 - (0)9 53 10 27 44
=A0 Cell: +33 - (0)6 85 62 59 98
=A0 Fax (F): +33 - (0)9 58 10 27 44

=A0 Fax (D): +49 - (0)3 21 21 25 22 44

=A0 email: Rainer@krugs.de

=A0 Skype: RMkrug



--
Rainer M. K= rug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl= . Phys. (Germany)

Centre of Excellence for Invasion Biology
Stell= enbosch University
South Africa

Tel : =A0 =A0 =A0 +33 - (0)9 53 10 27 44
Cell: =A0 = =A0 =A0 +33 - (0)6 85 62 59 98
Fax (F): =A0 =A0 =A0 +33 - (0)9 58 10 27 = 44

Fax (D): =A0 =A0+49 - (0)3 21 21 25 22 44

email: =A0 =A0 = =A0Rainer@krugs.de=

Skype: =A0 =A0 =A0RMkrug

--20cf3005dee87f48f504a6745757--