[R] Error while working with png output on linux server

MacQueen, Don macqueen1 at llnl.gov
Thu Feb 1 22:34:39 CET 2018


What does
   capabilities()
return?

For example, I get

> capabilities()
       jpeg         png        tiff       tcltk         X11 
       TRUE        TRUE        TRUE        TRUE        TRUE 
       aqua    http/ftp     sockets      libxml        fifo 
       TRUE        TRUE        TRUE        TRUE        TRUE 
     cledit       iconv         NLS     profmem       cairo 
      FALSE        TRUE        TRUE        TRUE        TRUE 
        ICU long.double     libcurl 
       TRUE        TRUE        TRUE

If you get FALSE for png or X11, then you do indeed have an issue with your installation. And probably, as Jeff Newmiller suggested, with which support software is or is not installed on the system.

-Don


--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
 
 
On 2/1/18, 6:50 AM, "R-help on behalf of Sariya, Sanjeev" <r-help-bounces at r-project.org on behalf of ss5505 at cumc.columbia.edu> wrote:

    I'm working on linux server:
    Linux  4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux
    
    I get error while creating png files. I'm sharing my commands and error while I run those commands:
    
    >png("abc", type="cairo")
    Error in .External2(C_X11, paste0("png::", filename), g$width, g$height,  :
      unable to start device PNG
    In addition: Warning message:
    In png("abc", type = "cairo") : unable to open connection to X11 display ''
    
    > png("apoeqqplot.png", res=600)
    Error in .External2(C_X11, paste0("png::", filename), g$width, g$height,  :
      unable to start device PNG
    In addition: Warning message:
    In png("apoeqqplot.png", res = 600) :
      unable to open connection to X11 display ''
    
    dev.off()
    
    R version 3.4.2 (2017-09-28)
    Platform: x86_64-pc-linux-gnu (64-bit)
    Running under: Debian GNU/Linux 9 (stretch)
    
    Matrix products: default
    BLAS: /mnt/mfs/cluster/bin/R-3.4/lib/libRblas.so
    LAPACK: /mnt/mfs/cluster/bin/R-3.4/lib/libRlapack.so
    
    locale:
    [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
    [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
    [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
    [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
    [9] LC_ADDRESS=C               LC_TELEPHONE=C
    [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base
    
    other attached packages:
    [1] CMplot_3.3.1
    
    loaded via a namespace (and not attached):
    [1] compiler_3.4.2 tools_3.4.2
    
    
    How do I fix this?
    
    
    	[[alternative HTML version deleted]]
    
    ______________________________________________
    R-help at 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.
    



More information about the R-help mailing list