使用 R 的系统调用调用 Qiime

calling Qiime with system call from R

他,

当我尝试使用来自 R 的系统调用来调用 QIIME 时,即

system2("macqiime")

R 停止响应。不过其他命令行程序没问题。

是否可以通过 system2()R 调用某些程序?

MacQIIME version: MacQIIME 1.8.0-20140103

Sourcing MacQIIME environment variables...

This is the same as a normal terminal shell, except your default python is DIFFERENT (/macqiime/bin/python) and there are other new QIIME-related things in your PATH.

(请注意,我主要想用 engine = "sh"R Markdown 调用 QIIME,但也失败了。但我强烈怀疑这些问题是相关的)

根据我的经验,当您从 unix 命令行调用 Qiime 时,它​​通常会为 运行 它的命令创建一个属于它自己的虚拟 shell,这与 ls 等常规系统命令不同或MV。我怀疑您可能无法从 R 中 运行 Qiime,除非您模拟相同的 shell 或 Qiime 需要的配置。我尝试从 python 脚本 运行 它但没有成功。