我正在尝试使用GrImport函数将大脑的矢量图形导入R中。插入以下函数时:
PostScriptTrace("~/Dropbox/shared/Brain_mapping/Human-brain.ps", "~/Dropbox/shared/Brain_mapping/Human-brain.xml")我得到了这个错误:
Error in PostScriptTrace("~/Dropbox/Natasha_shared/Brain_mapping/Human-brain.ps", :
status 255 in running command 'gs -q -dBATCH -dNOPAUSE -sDEVICE=ps2write -sOutputFile=/dev/null -sstdout=~/Dropbox/Natasha_shared/Brain_mapping/Human-brain.xml captureHuman-brain.ps'发布于 2014-03-13 22:44:22
这似乎不是一个常规的PostScript错误,我有点不明白为什么这个命令将设备设置为ps2write。ps2write生成PostScript作为其输出,我不明白您为什么要将PostScript输入转换为PostScript输出!
它还将输出定向到/dev/null,因此该命令看起来并不能做任何有用的事情。哦,'-q‘抑制了大多数错误消息,这在调试问题时没有什么帮助。
你能分享原始的PostScript文件吗?
发布于 2015-02-09 03:21:38
最有可能的情况是,矢量图形中有一堆不在字体目录中的字符。以下gs行是一个很好的变通方法,您必须在命令行上运行它(而不是在R中):
gs -sDEVICE=ps2write -dNOCACHE -sOutputFile=nochar_Human-brain.ps -q -dbatch -dNOPAUSE -dQUIET Human-brain.ps -c quit之后,你将得到一个新的向量文件,你可以像这样在R中使用它:
PostScriptTrace("nochar_Human-brain.ps", "nochar_Human-brain.xml")https://stackoverflow.com/questions/22378958
复制相似问题