emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tangle including code generating graphics for :results graphics


From: Andreas Leha
Subject: Re: [O] Tangle including code generating graphics for :results graphics
Date: Thu, 24 Sep 2015 09:41:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin)

Hi Rainer,

Rainer M Krug <address@hidden> writes:
> Hi
>
> Is it possible to tangle an R code block including the code which is
> generating the graphs when using =:results graphics= ?
>
> I would like to tangle these code blocks generating the graphs as I
> would like to have a script which I can use to easily update all graphs
> when the simulated input data is updated. I have this for the actual
> analysis which works perfectly, but would like to have the same for the
> graphs. At the same time, I like the clarity of specifying :width and
> :height and other parameter for the plotting as header arguments.
>
> I have
>
> ,----
> | :PROPERTIES:
> | :header-args+: :prologue "env <- fitBFGS; attach(env)"
> | :header-args+: :epilogue "detach(env); rm(env)"
> | :END:
> `----
>
> and this is tangled perfectly - but obviously not the code for
> plotting. Is there an argument / setting to enable this?
>
> Thanks,
>
> Rainer

That is a very relevant question and I'd be interested in the answer as
well.  But I am not aware of any support by Org mode for this.

I guess calling `org-babel-expand-src-block' prior to tangling would
answer your needs?

This would be desirable not only for plotting code blocks, also data
passed to code block is 'lost' during tangling.

I think it would be good to have a source block header argument, say
`:tangleexpanded', controlling such functionality.

WDYT?

Regards,
Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]