不应以组织模式在R代码块中输出输出

问题描述 投票:0回答:1

我刚刚升级到组织9.3.6,现在我的R代码块无法按预期工作。例如,我有这个简单的代码块,

#+BEGIN_SRC R :session
  mtcars1 <- mtcars
#+END_SRC

我不希望看到任何输出,因为我将mtcars保存为mtcars1,因此R不应返回任何内容。但是,我看到了这个,

enter image description here因此,它正在运行

print(mtcars1)

为什么?我不希望/不希望看到任何输出,尤其是对于较大的数据帧,因为它会阻塞emacs。

r emacs org-mode ess
1个回答
0
投票

看起来您正在使用组织结构源标头中的默认值:results value。可以根据具体情况使用

进行更改
#+begin_src R :session :results output
mtcars1 <- mtcars 
#+end_src

或更改您的组织(或ess / R)初始配置中的默认设置

(setq org-babel-default-header-args:R '((:results . "output")))
© www.soinside.com 2019 - 2024. All rights reserved.