emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [org-babel-R] Help: In converting an .org file to pdf, do I need to re-run the R code even if I ran them previously?
@ 2010-12-02  9:05 Sunny Srivastava
  2010-12-02 15:33 ` Thomas S. Dye
  0 siblings, 1 reply; 3+ messages in thread
From: Sunny Srivastava @ 2010-12-02  9:05 UTC (permalink / raw)
  To: emacs-orgmode mailing list


[-- Attachment #1.1: Type: text/plain, Size: 1073 bytes --]

Hello Org-moders:

I am trying to use org-mode, instead of Sweave, to write a report for a
statistical analysis. During the process of writing, I prefer to export the
org file to pdf to see the output (for sanity check). However, every time I
do this, I get a question in minibuffer to choose if I want to "run the R
code". I have three questions related to this:

1. Can I turn this feature off and let "org-babel-R" (sorry if this is
something else) automatically choose YES if the code has not been run
already and NO if the code has been already run.

2. Currently, if the code was run already, I choose NO. I am assuming this
won't affect the results. Am I correct? (If I change something in the code I
run it using C-c in org-mode before exporting it to pdf)

3. Is there a way to know which R code chunk is "org-babel-R" asking to run,
when it asks the question about running the R code.

I looked in the uses of org-babel-R webpage on worg, but could not see
anything related to this. Sorry if I missed something or the query is too
basic.

Thank you.

Regards,
S.

[-- Attachment #1.2: Type: text/html, Size: 1377 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [org-babel-R] Help: In converting an .org file to pdf, do I need to re-run the R code even if I ran them previously?
  2010-12-02  9:05 [org-babel-R] Help: In converting an .org file to pdf, do I need to re-run the R code even if I ran them previously? Sunny Srivastava
@ 2010-12-02 15:33 ` Thomas S. Dye
  2010-12-02 19:22   ` Sunny Srivastava
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2010-12-02 15:33 UTC (permalink / raw)
  To: Sunny Srivastava; +Cc: emacs-orgmode mailing list

Aloha Sunny,

On Dec 1, 2010, at 11:05 PM, Sunny Srivastava wrote:

> Hello Org-moders:
>
> I am trying to use org-mode, instead of Sweave, to write a report  
> for a statistical analysis. During the process of writing, I prefer  
> to export the org file to pdf to see the output (for sanity check).  
> However, every time I do this, I get a question in minibuffer to  
> choose if I want to "run the R code". I have three questions related  
> to this:
>
> 1. Can I turn this feature off and let "org-babel-R" (sorry if this  
> is something else) automatically choose YES if the code has not been  
> run already and NO if the code has been already run.
>

This is the :cache header argument.  The setting you want is :cache yes.

> 2. Currently, if the code was run already, I choose NO. I am  
> assuming this won't affect the results. Am I correct? (If I change  
> something in the code I run it using C-c in org-mode before  
> exporting it to pdf)
>
> 3. Is there a way to know which R code chunk is "org-babel-R" asking  
> to run, when it asks the question about running the R code.
>

This behavior has changed relatively recently. I believe that with a  
recent version, answering NO won't abandon the evaluation of  
subsequent code blocks, and that the code block name is visible when  
the question is asked.  This is something I don't use, so you'd have  
to pull and see for yourself.

For me, it is preferable to disable the query.  To disable the query,  
I set this:

#+begin_src emacs-lisp :tangle yes
    (setq org-confirm-babel-evaluate nil)
#+end_src

hth,
Tom
> I looked in the uses of org-babel-R webpage on worg, but could not  
> see anything related to this. Sorry if I missed something or the  
> query is too basic.
>
> Thank you.
>
> Regards,
> S.
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [org-babel-R] Help: In converting an .org file to pdf, do I need to re-run the R code even if I ran them previously?
  2010-12-02 15:33 ` Thomas S. Dye
@ 2010-12-02 19:22   ` Sunny Srivastava
  0 siblings, 0 replies; 3+ messages in thread
From: Sunny Srivastava @ 2010-12-02 19:22 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode mailing list


[-- Attachment #1.1: Type: text/plain, Size: 2128 bytes --]

Thank you Thomas.

On Thu, Dec 2, 2010 at 10:33 AM, Thomas S. Dye <tsd@tsdye.com> wrote:

> Aloha Sunny,
>
>
> On Dec 1, 2010, at 11:05 PM, Sunny Srivastava wrote:
>
>  Hello Org-moders:
>>
>> I am trying to use org-mode, instead of Sweave, to write a report for a
>> statistical analysis. During the process of writing, I prefer to export the
>> org file to pdf to see the output (for sanity check). However, every time I
>> do this, I get a question in minibuffer to choose if I want to "run the R
>> code". I have three questions related to this:
>>
>> 1. Can I turn this feature off and let "org-babel-R" (sorry if this is
>> something else) automatically choose YES if the code has not been run
>> already and NO if the code has been already run.
>>
>>
> This is the :cache header argument.  The setting you want is :cache yes.
>
>
>  2. Currently, if the code was run already, I choose NO. I am assuming this
>> won't affect the results. Am I correct? (If I change something in the code I
>> run it using C-c in org-mode before exporting it to pdf)
>>
>> 3. Is there a way to know which R code chunk is "org-babel-R" asking to
>> run, when it asks the question about running the R code.
>>
>>
> This behavior has changed relatively recently. I believe that with a recent
> version, answering NO won't abandon the evaluation of subsequent code
> blocks, and that the code block name is visible when the question is asked.
>  This is something I don't use, so you'd have to pull and see for yourself.
>
> For me, it is preferable to disable the query.  To disable the query, I set
> this:
>
> #+begin_src emacs-lisp :tangle yes
>   (setq org-confirm-babel-evaluate nil)
> #+end_src
>
> hth,
> Tom
>
>> I looked in the uses of org-babel-R webpage on worg, but could not see
>> anything related to this. Sorry if I missed something or the query is too
>> basic.
>>
>> Thank you.
>>
>> Regards,
>> S.
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 3039 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-02 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-02  9:05 [org-babel-R] Help: In converting an .org file to pdf, do I need to re-run the R code even if I ran them previously? Sunny Srivastava
2010-12-02 15:33 ` Thomas S. Dye
2010-12-02 19:22   ` Sunny Srivastava

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).