我正在尝试使用 grImport 库(http://cran.r-project.org/web/packages/grImport/vignettes/import.pdf)读取 ps.xml 文件这是我的代码:
require("gridBase")
require("grImport")
require("plotrix")
petal <- readPicture("petal.ps.xml")
这是我得到的错误:
Error in if (x == 0) 1 else if (x == 1) 0 else x :
missing value where TRUE/FALSE needed
这是我的会话信息
> 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
相同的代码适用于具有以下会话信息的 Linux F20
> 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