R Error In Png Unable To Start Device
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn
Unable To Start Png Device Ggsave
more about Stack Overflow the company Business Learn more about hiring developers or posting unable to start jpeg() device r ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Error In .external2(c_x11, Paste("png::", Filename, Sep = ""), G$width, : Unable To Start Device Png
Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up R unable to start device PNG - capabilities() has TRUE no png support in this version of r for PNG? up vote 0 down vote favorite I am working with a R script within a wider pipeline that seems to not work with some versions of Rscript but with others. The call fails due to being unable to connect to X11, which is understandable because this is on a server. But my local installation of Rscript is able to handle this fine? My local installation is r unable to open connection to x11 display version 3.0.1, while the one that other users that are reporting this problem are on 3.0.2. Here is a simple test case - first the .R file: #!/usr/bin/env Rscript capabilities() png("abc") dev.off() Run with my local env: -bash-4.1$ ./test.R jpeg png tiff tcltk X11 aqua http/ftp sockets TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE libxml fifo cledit iconv NLS profmem cairo TRUE TRUE FALSE TRUE TRUE FALSE TRUE null device 1 Run on the installation of Rscript others are trying to use: jpeg png tiff tcltk X11 aqua http/ftp sockets TRUE TRUE FALSE TRUE FALSE FALSE TRUE TRUE libxml fifo cledit iconv NLS profmem cairo TRUE TRUE FALSE TRUE TRUE FALSE TRUE Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width, : unable to start device PNG Calls: png In addition: Warning message: In png("abc") : unable to open connection to X11 display '' Execution halted r share|improve this question asked Jul 28 '14 at 16:39 Ian Fiddes 848923 add a comment| 4 Answers 4 active oldest votes up vote 5 down vote accepted In case anyone ever finds this on google, the solution is png("abc", type="cairo") share|improve this answer answered Jul 31 '14 at 16:46 Ian Fiddes 848923
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn
Shiny Server Unable To Start Device Png
more about Stack Overflow the company Business Learn more about hiring developers or r capabilities x11 false posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Warning: Error In .external2: Unable To Start Device Png
Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Can't display png up vote 3 down vote favorite http://stackoverflow.com/questions/24999983/r-unable-to-start-device-png-capabilities-has-true-for-png 2 I'm running R-shiny (R version 3.0.1 (2013-05-16)) on a VM (Red Hat Enterprise Linux Server release 6.4). Everything works, i.e., server starts up, and application runs etc... as long as I don't try to plot a graph renderPlot I then see on the main panel a message [error : unable to start device png]. I would post my whole code but this problem I think has to http://stackoverflow.com/questions/17243648/cant-display-png do with rendering plots as when I use renderText and spit out some data it works just fine. Actually when I just type in png() in R I get this error [ Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width, : unable to start device PNG In addition: Warning message: In png() : unable to open connection to X11 display '' ] of course if I forward via ssh -X to my mac, I can type in png() no problem and plot data etc... -A few more things to note, when I type in capabilties() I find the only things that are false are jpeg, tiff, X11, aqua, and profmem (so png and cairo are True) -I've installed libpng, cairo, and libX11, libX11-devel, libXt, libXt-devel before building R from source I'm guessing my problem is that I need to have X server running. In addition the DISPLAY variable is null. So, I guess when it boils down to it my question is ... assuming my logic is correct. 1) Do I need to run / start X server [ currently it terminates after starting for some reason] or can I just set the DISPLAY variable? 2) If I can
• rss Community Log In Sign Up Add New Post Question: Making PNG figures from plots https://biostar.usegalaxy.org/p/9170/ in R from toolshed (without X11) 0 2.1 years ago by y.hoogstrate • 280 Netherlands y.hoogstrate • 280 wrote: Hi everyone, I'm encountering problems when I want to export a plot from R into a PNG, using several R packages from the toolshed(s). This problem is probably related to the following issue: http://dev.list.galaxyproject.org/package-r-xx-problem-X11-is-not-available-td4663344.html unable to Therefore, I'm using the package: http://testtoolshed.g2.bx.psu.edu/view/iuc/package_r_3_0_2 When I run R code of the following structure: png(output_PValue_distribution_plot) plot(x_var,y_var) dev.off() R crashes with the following error: Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width, : unable to start device PNG Calls: png In addition: Warning message: In png(output_PValue_distribution_plot) : unable to open connection to X11 unable to start display '' Execution halted How I interpret this is that in order to produce PNG's, R needs to be compiled with the X11 library. Because the installer from the toolshed uses the compilation argument " --without-x", it doesn't compile with X11 and so it is not possible to produce PNGs, correct? I also tried another solution; installation of R with X from the following repository: https://testtoolshed.g2.bx.psu.edu/repository?repository_id=5f7d83aa4f577607 . However, the repository requires several other dependencies which are not programmed within the installer: libx11-dev libxt-dev (and some more, because after all it still work out). So, what would be the best way to create a PNG figure from my plot(s) within an R instance from a toolshed? Does it require R to be compiled with X11 or are there ways to overcome this (I am not sure but I thought I read something about Cairo)? Or would somebody recommend to use a non-R program to convert from e.g. PDF/SVG to