emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: Evaluating R source code line by line
Date: Tue, 16 Dec 2014 18:43:51 +0000	[thread overview]
Message-ID: <olutx0vsae0.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: oluy4q7sggk.fsf@med.uni-goettingen.de

Hi,

I stand corrected.  (Should test before I send...)

Here is a reply I received from Ista which -- I think -- did not make it
to the list:


On Tue, Dec 16, 2014 at 11:32 AM, Andreas Leha
<andreas.leha@med.uni-goettingen.de> wrote:
> Hi Vikas,
>
>
> Vikas Rawal <vikaslists@agrarianresearch.org> writes:
>>
>>
>>
>>     For your use case, I would suggest adding print() calls in
>>     strategic
>>     places in your long-running code, which will appear in the R
>>     buffer to
>>     let you know how it’s progressing.
>>
>>
>>
>> I don’t quite understand everything you wrote. But this would be
>> helpful for my test case. Will use.
>>
>> Thanks.
>>
>> Vikas
>
> I am joining late.  I suspect that this can be configured on the ESS
> side rather than on orgmode's side.
>
> Take a look at ess-eval-visibly (but beware the performance loss).

I thought so too, but I don't think that's the case. This affects how
org-babel behaves with :results output, but not the behavior with
:results value. At least that's the case here with org 8.2.10

Running these two examples:

#+BEGIN_SRC R :results value :session *R*
  a <- 1
  b <- 2
  print(a + b)
#+END_SRC

#+RESULTS:
: 3

#+BEGIN_SRC R :results output :session *R*
  a <- 1
  b <- 2
  print(a + b)
#+END_SRC

#+RESULTS:
: [1] 3


I see

>>
+ + [1] 3
>>

for the first one and

> a <- 1
b <- 2
print(a + b)
'org_babel_R_eoe'
a <- 1
> b <- 2
> print(a + b)
[1] 3
> 'org_babel_R_eoe'
[1] "org_babel_R_eoe"
>

for the second one. I have ess-eval-visibly set to t.

Best,
Ista

      reply	other threads:[~2014-12-16 18:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-13  2:26 Evaluating R source code line by line Vikas Rawal
2014-12-13 10:12 ` Daniele Pizzolli
2014-12-13 13:18   ` Vikas Rawal
2014-12-13 19:38     ` Aaron Ecay
2014-12-15 22:58       ` Vikas Rawal
2014-12-16 16:32         ` Andreas Leha
2014-12-16 18:43           ` Andreas Leha [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=olutx0vsae0.fsf@med.uni-goettingen.de \
    --to=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).