[Rd] Bug#505698: r-base-core: dev2bitmap fails with gsexe related error (PR#13288)

edd at debian.org edd at debian.org
Fri Nov 14 15:15:04 CET 2008


Stefano,

Thanks for the bug report.

On 14 November 2008 at 14:35, Stefano Costa wrote:
| Package: r-base-core
| Version: 2.8.0-1
| Severity: normal
| 
| As in subject. The bug is reproducible on my machine with these 
| commands:
| 
| > x <- rnorm(100)
| > plot(density(x))
| > dev2bitmap("density.png")
| Error in paste(shQuote(gsexe), " -dNOPAUSE -dBATCH -q -sDEVICE=", type,  
| : 
|   object "extra" not found
| > 

Confirmed.  The code in looks a little off inasmuch as in     

    if (!is.na(taa)) 
        extra <- paste(" -dTextAlphaBits=", taa, sep = "")
    if (!is.na(gaa)) 
        extra <- paste(extra, " -dGraphicsAlphaBits=", gaa, sep = "")
    cmd <- paste(shQuote(gsexe), " -dNOPAUSE -dBATCH -q -sDEVICE=", 
        type, " -r", res, "-dAutoRotatePages=/None", " -g", ceiling(res * 
            width), "x", ceiling(res * height), extra, " -sOutputFile=", 
        shQuote(file), " ", tmp, sep = "")
    system(cmd)

'extra' does get set if and only if taa or gaa are given. Adding a simple

    extra <- ""

before the quoted code block fixes the trivial bug. I am CC'ing upstream.

All that said, you may also want to consider the somewhat better usage of 

   x <- rnorm(100)
   png("density.png")	## also see additional png arguments
   plot(density(x))
   dev.off()

to create density.png.

Thanks,  Dirk

| 
| 
| Best,
| Steko
| 
| 
| 
| -- System Information:
| Debian Release: lenny/sid
|   APT prefers unstable
|   APT policy: (500, 'unstable'), (101, 'experimental')
| Architecture: amd64 (x86_64)
| 
| Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
| Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
| Shell: /bin/sh linked to /bin/dash
| 
| Versions of packages r-base-core depends on:
| ii  libatlas3gf-base [libl 3.6.0-22          Automatically Tuned Linear Algebra
| ii  libblas3gf [libblas.so 1.2-2             Basic Linear Algebra Subroutines 3
| ii  libc6                  2.7-16            GNU C Library: Shared libraries
| ii  libcairo2              1.6.4-6.1         The Cairo 2D vector graphics libra
| ii  libgfortran3           4.3.2-1           Runtime library for GNU Fortran ap
| ii  libglib2.0-0           2.16.6-1          The GLib library of C routines
| ii  libice6                2:1.0.4-1         X11 Inter-Client Exchange library
| ii  libjpeg62              6b-14             The Independent JPEG Group's JPEG 
| ii  liblapack3gf [liblapac 3.1.1-6           library of linear algebra routines
| ii  libpango1.0-0          1.20.5-3          Layout and rendering of internatio
| ii  libpaper-utils         1.1.23+nmu1       library for handling paper charact
| ii  libpcre3               7.8-2             Perl 5 Compatible Regular Expressi
| ii  libpng12-0             1.2.27-2          PNG library - runtime
| ii  libreadline5           5.2-3             GNU readline and history libraries
| ii  libsm6                 2:1.0.3-2         X11 Session Management library
| ii  libtiff4               3.8.2-11          Tag Image File Format (TIFF) libra
| ii  libx11-6               2:1.1.5-2         X11 client-side library
| ii  libxext6               2:1.0.4-1         X11 miscellaneous extension librar
| ii  libxss1                1:1.1.3-1         X11 Screen Saver extension library
| ii  libxt6                 1:1.0.5-3         X11 toolkit intrinsics library
| ii  perl                   5.10.0-17         Larry Wall's Practical Extraction 
| ii  tcl8.5                 8.5.3-2           Tcl (the Tool Command Language) v8
| ii  tk8.5                  8.5.3-4           Tk toolkit for Tcl and X11, v8.5 -
| ii  ucf                    3.0010            Update Configuration File: preserv
| ii  unzip                  5.52-12           De-archiver for .zip files
| ii  zip                    2.32-1            Archiver for .zip files
| ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime
| 
| Versions of packages r-base-core recommends:
| ii  r-base-dev                    2.8.0-1    GNU R installation of auxiliary GN
| ii  r-recommended                 2.8.0-1    GNU R collection of recommended pa
| 
| Versions of packages r-base-core suggests:
| pn  ess                           <none>     (no description available)
| ii  r-base-html                   2.8.0-1    GNU R html docs for statistical co
| ii  r-base-latex                  2.8.0-1    GNU R LaTeX docs for statistical c
| pn  r-doc-info | r-doc-pdf | r-do <none>     (no description available)
| pn  r-mathlib                     <none>     (no description available)
| 
| -- no debconf information
| 
| 

-- 
Three out of two people have difficulties with fractions.



More information about the R-devel mailing list