[ESS] Is there a way of incorporating graphics in ESS transcripts?
Christian Hoffmann
christian.hoffmann at wsl.ch
Mon Jan 9 09:59:33 CET 2006
Tony Plate schrieb:
> I'm looking for an easy way to incorporate graphics in ESS transcripts,
> so that I can have plots as well as text and tabular output in a text
> transcript of an R session. I want to use this as way of keeping track
> of the work I do, in an interactive & ongoing manner (i.e., as I develop
> & run new commands, I want to add the commands and output, both text and
> graphical, to my transcript.)
>
> I've searched through the ESS documentation, and searched on the WWW,
> but I can't find anything that talks about incorporating R graphics in
> ESS transcripts. (Did I miss anything?)
>
> It looks like Emacs has gained the ability to display graphics in files,
> but I'm not sure whether this is usable in ordinary text files (or
> whether there are any suitable vector graphics formats that can be used.)
>
> Alternatives that I've considered are:
>
> (1) AucTex with its preview feature. The disadvantage of this is that
> it makes it more cumbersome to keep a simple transcript, and what mode
> would I use for the buffer that contained the transcript? -- probably
> some tex mode, whereas I would prefer an ess mode.
>
> (2) OpenOffice.org writer document. At work I'm currently using a
> system where I've got OpenOffice.org & S-PLUS talking to each other and
> can easily insert graphics in the document, and send commands from
> transcripts in the document to S-PLUS. However, I'd rather edit my
> transcripts in emacs, and I haven't done the work to get OpenOffice.org
> talking with R.
>
> (3) Sweave. This appears to produce very nice documents, but AFAICS
> it's not suitable for my purposes because I need to be able to
> interactively modify & rerun just selected commands from the
> transcripts. My work involves intensive computation, so a document
> might have commands that take several weeks to run. Rerunning all the
> commands whenever something is changed or added to is not feasible.
>
> Any suggestions?
>
> Tony Plate
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>
>
Hi Tony,
Concerning (3) Sweave. I found a fairly easy way to rerun selected
commands. I split my whole document into two parts, the main part with
\begin{document} .... \end{document} and the minor part which contains
all the commands I do not want to rerun. The trick is to comment/
uncomment a line \SweaveInput{minor}
%%% major.Rnw:
\documentclass[10pt,a4paper,leqno]{scrartcl}
.....
\begin{document}
%% comment/uncomment: \SweaveInput{minor.Rnw}
%% modify & rerun just selected commands:
\end{document}
%%% end major.Rnw
---------------------
%%% minor.Rnw
%% all the text and commands which need not be rerun.
%%% end minor.Rnw
--------------------
This procedure will, however, only produce a .tex without the parts not
to be rerun.
How to produce the full document without rerunning the whole .Rnw, would
require some work on the part of the Sweave authors.
Regards
Christian
--
Dr. Christian W. Hoffmann,
Swiss Federal Research Institute WSL
Mathematics + Statistical Computing
Zuercherstrasse 111
CH-8903 Birmensdorf, Switzerland
Tel +41-44-7392-277 (office) -111(exchange)
Fax +41-44-7392-215 (fax)
christian.hoffmann at wsl.ch
http://www.wsl.ch/staff/christian.hoffmann
International Conference 5.-7.6.2006 Ekaterinburg Russia
"Climate changes and their impact on boreal and temperate forests"
http://ecoinf.uran.ru/conference/
More information about the ESS-help
mailing list