Re: [R] saving png images and X11
Hi Bogdan, If we take the error message seriously, it may be that the initial X11 image was never displayed. When this very suspicious black box function tried to transfer the image to a PNG file, it wasn't there or the function couldn't find it. Jim On Sun, Feb 27, 2022 at 2:51 AM Bogdan Tanasa wrote: > > Dear all, > > I am using a R package that renders the png images. As I am running the > command below in a script, I would like to avoid the error below and still > be able to save the images. How shall I do it ? > > > ChIPQCreport(SAMPLE, + reportName = paste(ENTRY, "ChIPQC", > > sep="."), + reportFolder = paste(ENTRY, "ChIPQCreport", > > sep=".")) > Saving 7 x 7 in image > Error in png_dev(..., res = dpi, units = "in") : X11 is not available > > Shall I add the option : > > options(bitmapType='cairo') > > the png images are skipped and not saved on the disk. Thanks a lot, > > Bogdan > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] saving png images and X11
On Fri, 25 Feb 2022 04:33:38 -0800 Bogdan Tanasa wrote: > Error in png_dev(..., res = dpi, units = "in") : X11 is not available > > Shall I add the option : > > options(bitmapType='cairo') > > the png images are skipped and not saved on the disk. Is this a question or a statement that png('file.png', type = 'cairo'); plot(1,1); dev.off() doesn't produce any files for you? What's the output of capabilities() and sessionInfo() in this build of R? > [[alternative HTML version deleted]] P.S. Please compose your messages in plain text. Since this mailing list strips the HTML parts of your messages, we only get the plain text part automatically produced by your mailer, some of it mangled quite a bit. -- Best regards, Ivan __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] saving png images and X11
This is rather OS-dependent. You should read [1] and if if you need more help consider asking in one of the OS-specific mailing lists mentioned in the Posting Guide. https://cran.r-project.org/doc/manuals/r-release/R-admin.html On February 25, 2022 4:33:38 AM PST, Bogdan Tanasa wrote: >Dear all, > >I am using a R package that renders the png images. As I am running the >command below in a script, I would like to avoid the error below and still >be able to save the images. How shall I do it ? > >> ChIPQCreport(SAMPLE, + reportName = paste(ENTRY, "ChIPQC", >> sep="."), + reportFolder = paste(ENTRY, "ChIPQCreport", >> sep=".")) >Saving 7 x 7 in image >Error in png_dev(..., res = dpi, units = "in") : X11 is not available > >Shall I add the option : > >options(bitmapType='cairo') > >the png images are skipped and not saved on the disk. Thanks a lot, > >Bogdan > > [[alternative HTML version deleted]] > >__ >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. -- Sent from my phone. Please excuse my brevity. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.