2013-05-17 70 views
0

我試圖從R內使用下面的命令調用的Cygwin中調用的Cygwin:來自R

shell("cd C:\\cygwin\\bin & bash --login -i testfile2.txt", intern = T) 

在Cygwin我試着用別的程序(教堂)。該invokation在testfile2.txt,看起來像這樣:

/cygdrive/c/cygwin/home/$USER/jschurch/bher /cygdrive/c/cygwin/home/$USER/foo.church > /cygdrive/c/cygwin/home/$USER/output.txt 

不過,我得到以下錯誤消息:

> shell("@echo on & cd C:\\cygwin\\bin & bash --login -i testfile2.txt", intern = T) 
[1] "bash: cannot set terminal process group (-1): Inappropriate ioctl for device"                                                                                                                                                                                                                                                                                                                               
[2] "bash: no job control in this shell"                                                                                                                                                                                                                                                                                                                                          
[3] "Unhandled exception:"                                                                                                                                                                                                                                                                                                                                             
[4] " Condition components:"                                                                                                                                                                                                                                                                                                                                             
[5] " 1. &error"                                                                                                                                                                                                                                                                                                                                               
[6] " 2. &who: expander"                                                                                                                                                                                                                                                                                                                                             
[7] " 3. &message: \"cannot locate library in library-path\""                                                                                                                                                                                                                                                                                                                                    
[8] " 4. &library-resolution:"                                                                                                                                                                                                                                                                                                                                            
[9] "  library: (scheme-tools srfi-compat :1)"                                                                                                                                                                                                                                                                                                                                       
[10] "  files: (\"./scheme-tools/srfi-compat/%3a1/main.vicare.sls\" \"./scheme-tools/srfi-compat/%3a1/main.vicare.ss\" \"./scheme-tools/srfi-compat/%3a1/main.vicare.scm\" \"./scheme-tools/srfi-compat/%3a1/main.sls\" \"./scheme-tools/srfi-compat/%3a1/main.ss\" \"./scheme-tools/srfi-compat/%3a1/main.scm\" \"./scheme-tools/srfi-compat/%3a1.vicare.sls\" \"./scheme-tools/srfi-compat/%3a1.vicare.ss\" \"./scheme-tools/srfi-compat/%3a1.vicare.scm\" \"./scheme-tools/srfi-compat/%3a1.sls\" \"./scheme-tools/srfi-compat/%3a1.ss\" \"./scheme-tools/srfi-compat/%3a1.scm\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1/main.vicare.sls\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1/main.vicare.ss\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1/main.vicare.scm\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1/main.sls\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1/main.ss\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1/main.scm\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1.vicare.sls\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1.vicare.ss\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1.vicare.scm\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1.sls\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1.ss\" \"/usr/local/lib/vicare/scheme-tools/srfi-compat/%3a1.scm\")" 

任何人都可以解釋我,如何處理這個問題?

謝謝, 大衛

+0

除非您的命令直接從cmd.exe會話中正確運行,否則這不是一個'R'問題,也不可能是一個'cygwin'問題。 –

+0

你見過[這個問題](http://stackoverflow.com/questions/5068264/cant-call-cygwin-commands-from-r)? – nograpes

回答

0

使用命令c:\cygwin\bin\run.exe從Windows啓動cygwin的過程。它應該清除問題。

run [ -p path ] command [ -wait ] arguments

使用-p路徑可以添加路徑PATH環境變量。