From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremie Juste Subject: Re: org-babel strange html print in R Date: Sat, 08 Feb 2020 09:42:11 +0100 Message-ID: <87lfpdo4gs.fsf@gmail.com> References: <875zgjh8wn.fsf@gmail.com> <3215656.Ko1QCt5if5@ylum> <878sle1mec.fsf@gmail.com> <87pneqnecb.fsf@gmail.com> <874kw1uapu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:53911) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0Lgv-0003z4-Ed for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 03:42:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0Lgu-0001nj-BC for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 03:42:17 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:35105) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0Lgu-0001mA-5j for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 03:42:16 -0500 Received: by mail-wr1-x42e.google.com with SMTP id w12so1593097wrt.2 for ; Sat, 08 Feb 2020 00:42:16 -0800 (PST) In-Reply-To: <874kw1uapu.fsf@gmail.com> (Jack Kamm's message of "Fri, 07 Feb 2020 17:30:37 -0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Jack Kamm Cc: emacs-orgmode@gnu.org Hello Jack, Thanks for taking the time to reply. > I think a more reliable implementation would be to avoid > `org-babel-comint-with-output', and take the approach used in the > ":results value" case, which reads the output from a temp file instead > of directly from the shell. I understand better now. Thanks > > Actually, that's the approach I use in my ob-session-async package [0], > which re-implements ob-R sessions to allow async evaluation. It doesn't > suffer from the bug you are reporting. I'll plan to extract that > implementation and submit it as a patch here. Your solution works just fine. I came across ob-session-async a recently and find it very interesting thanks again. #+begin_src R :results output html :cache no :async session library(xtable) x <- rnorm(100) y <- x + rnorm(100) a <- summary(lm(y ~ x)) print(xtable(a),type="html",comment=FALSE) #+end_src #+RESULTS: #+begin_export html
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.1249 0.0961 1.30 0.1969
x 0.9263 0.0879 10.53 0.0000
#+end_export Best regards, Jeremie