[BioC] save R graphics device output in a file

Florian Hahne fhahne at fhcrc.org
Mon Apr 14 18:00:27 CEST 2008


Hi Carol,
In order to save graphics on a file device you need to properly close  
this device after the plotting, that is, use dev.off() I am not sure  
what you mean by "running R in the background". Did you start it via R  
CMD batch or something similar as a background process? In any case,  
the proper use of jpeg() and dev.off() should create a valid image  
file irespective of that, unless you are on remote machine without x11  
port forwarding, which again should result in a number of errors.
Sending a brief example of code that illustrates your problem and at  
least some information about your R version would also help
Cheers
Florian



On 14.04.2008, at 08:22, carol white <wht_crl at yahoo.com> wrote:

> Hi,
> I tried to use savepng (library geneplotter) or jpeg (grDevices) to  
> save the R output image in a file. When I run R in foreground,  
> savepng saves the image in a file but when I run R in background (in  
> a unix terminal shell), a file is created but with 0 byte. When the  
> jpeg is used in R in bg or fg, a file is created with 0 byte. Why is  
> the image not saved when I run the R in bg?
>
> Regards,
>
> carol
>
>
>
>
>       
> ____________________________________________________________________________________
 

> Be a better friend, newshound, and
>
>    [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list