is it possible to display plots in an emacs buffer?

A.J. Rossini rossini at
Mon May 24 17:05:47 CEST 2004

Na Li <nali at> writes:

> On 24 May 2004, Andrew Robinson verbalised:
>> I have that problem too.
>> My solution is to save the results of expensive computation as
>> binary objects, and read them unless you need them recalculated.
>> The recalculation can be controlled by flags and if statements.
>> Andrew
>> On Mon, 24 May 2004, Na Li wrote:
>> > On 24 May 2004, Damon Wischik stated:
>> > 
>> > > I used to use Mathematica, before I came to R. Mathematica has a
>> > > strange mixture of the elegant and the foul. One thing I liked very
>> > > much is its "mathematical document" idea: a document which
>> > > intersperses input and output.
>> > 
>> > I like the idea too.  In term of the Sweave approach, it is very
>> > inefficient to re-evaluate some expensive computation every time a
>> > conversion from Rnw to tex is made.  It would be nice to have the R
>> > text output inside the Rnw buffer and the reevaluation should only be
>> > done when asked. I can live without the graphics for the moment.
>> > 
> In light of that, it might be useful to have
> \include{expensive}
> in an Rnw file, If expensive.tex is available, it is included without any
> re-evaluation, otherwise, include expensive.Rnw and sweave it as usual.
> I suppose it is possible right now to use a Makefile for it.

What I currently do is wrap expensive calculations (say, anything over
3 minutes), within a logical step which is basically:

  "if data was saved, load, else calcuate"

I've not factored it out yet, but it's not hard to write such a macro
de novo.  The one extension which would be cheap would be to compare
timestamps between the saved file and the Rnw file.  The expensive but
better version would be for Emacs/ESS to timestamp changes to the
code chunk, in much the same way as it currently does for HTML files
if you let it, and then compare that time stamp rather than the whole
Sweave file timestamp.


rossini at   
Biomedical and Health Informatics   University of Washington
Biostatistics, SCHARP/HVTN          Fred Hutchinson Cancer Research Center
UW (Tu/Th/F): 206-616-7630 FAX=206-543-3461 | Voicemail is unreliable
FHCRC  (M/W): 206-667-7025 FAX=206-667-4812 | use Email

CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}

More information about the ESS-help mailing list