Bumping this one up because the 'before.plot.new' solution turned out
to be sub-optimal after all.
>> It should be possible to do this with a before.plot.new hook, right?
>
> Yes, sure, if you treat the first and last plot separately.
It turns out that the before.plot.new hook does not is not tri
On Jul 11, 2011, at 22:08 , Greg Snow wrote:
> Note the warning on the help page for recordPlot. If your colleague is using
> a different version of R than you there could be problems.
Also notice that the process isn't perfect, as people occasionally discover
when they use dev.copy() and its
Thanks I didn't know about that. I ended up with something like this.
Is there a more elegant way to do it?
myplots <<- list();
hasplots <<- FALSE;
setHook("before.plot.new", function(...) {
if(hasplots == FALSE){
hasplots <<- TRUE;
} else {
myplots[[length(myplots)+1]] <<- rec
On 16.07.2011 20:17, Hadley Wickham wrote:
Thank you, this is very helpful. One final question regarding this method:
suppose a function prints multiple plots, i.e. multiple pages to a PDF. Is
it possible to record all of these plots at once? The code below only
records the final plot. I would
>> Thank you, this is very helpful. One final question regarding this method:
>> suppose a function prints multiple plots, i.e. multiple pages to a PDF. Is
>> it possible to record all of these plots at once? The code below only
>> records the final plot. I would like to record all of them, without
.org
Subject: Re: [R] Save generic plot to file (before rendering to device)
You can also save a data (or function) object to an .Rdata file with
save(objname, file="filename.Rdata") and your colleagues could then
load("filename.Rdata") in R.
Thanks for the responses. I fou
;> greg.s...@imail.org
>> 801.408.8111
>>
>>
>> -Original Message-
>>> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
>>> project.org] On Behalf Of Jeroen Ooms
>>> Sent: Monday, July 11, 2011 12:22 PM
>>> To: David
r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Jeroen Ooms
> Sent: Monday, July 11, 2011 12:22 PM
> To: David Winsemius
> Cc: r-help@r-project.org
> Subject: Re: [R] Save generic plot to file (before rendering to device)
>
> >
> > Y
>
> You can also save a data (or function) object to an .Rdata file with
> save(objname, file="filename.Rdata") and your colleagues could then
> load("filename.Rdata") in R.
>
Thanks for the responses. I found an old post by Gabor Grothendieck that
shows what I want. Basically the trick is to sav
On Jul 11, 2011, at 12:08 PM, jeroen00ms wrote:
I am looking for a way to save a plot (graphics contents) to a file
after the
plot has been calculated but before it has been rendered. More
specifically,
assume that I made a plot that took a very long time to produce, I
would
like to save t
After the plot is created, you can save the graph as a pdf document (file menu,
save as). You can then send the pdf file to your colleagues.
John
John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Me
I am looking for a way to save a plot (graphics contents) to a file after the
plot has been calculated but before it has been rendered. More specifically,
assume that I made a plot that took a very long time to produce, I would
like to save this plot to a generic file that I can later, on a differe
12 matches
Mail list logo