r - readPicture function (grImport package) not working on Linux (F22) -


i'm trying read ps.xml file using grimport library (http://cran.r-project.org/web/packages/grimport/vignettes/import.pdf) here code:

require("gridbase") require("grimport") require("plotrix") petal <- readpicture("petal.ps.xml") 

and error i'm getting:

error in if (x == 0) 1 else if (x == 1) 0 else x :                                                                                                         missing value true/false needed         

here session information

> sessioninfo() r version 3.2.0 (2015-04-16)                                                                                                                               platform: x86_64-redhat-linux-gnu (64-bit)                                                                                                                 running under: fedora 22 (twenty two)  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] grid      stats     graphics  grdevices utils     datasets      methods   [8] base       other attached packages: [1] plotrix_3.5-12 grimport_0.9-0 xml_3.98-1.3   gridbase_0.4-7 

the same code works on linux f20 following session information

> sessioninfo() r version 3.2.0 (2015-04-16)                                                                                                                               platform: x86_64-redhat-linux-gnu (64-bit)                                                                                                                 running under: fedora 20 (heisenbug)  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] grid      stats     graphics  grdevices utils     datasets      methods   [8] base       other attached packages: [1] plotrix_3.4-8 grimport_0.8-4 xml_3.96-1.1   gridbase_0.4-6 

i struggled same problem , solved regenerating xml postscripttrace on other platform. when comparing files generated on 2 platforms, found failing image file missing attributes in path/context/style element. able manually add missing attributes lineend, linemitre, , linejoin , load images.

i suspect missing elements source of problem in versions of grimport.


Comments