浏览代码

Set R's init options

The R's init options: --no-save, --vanilla, --quiet; have been set to
avoid undesired and unpredicted effects.

- --no-save blocks R from saving the default envirionment
- --vanilla doesn't read the environment files
- --quiet doesn't print startup message

In the future these options might be set as RMD_READER options (in
pelicanconf), but for now I think a better idea is making them as default.
wilsonfreitas 8 年之前
父节点
当前提交
76654fd725
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      rmd_reader/rmd_reader.py

+ 2 - 0
rmd_reader/rmd_reader.py

@@ -19,6 +19,8 @@ def initsignal(pelicanobj):
     try:
         with warnings.catch_warnings():
             warnings.simplefilter("ignore")
+            import rpy2.rinterface
+            rpy2.rinterface.set_initoptions((b'rpy2', b'--no-save', b'--vanilla', b'--quiet'))
             from rpy2.robjects.packages import importr
             import rpy2.robjects as robjects
         knitr = importr('knitr')