From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremie Juste Subject: org-babel strange html print in R Date: Thu, 06 Feb 2020 19:23:36 +0100 Message-ID: <875zgjh8wn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59956) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izloS-000249-Ut for emacs-orgmode@gnu.org; Thu, 06 Feb 2020 13:23:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izloR-0006Mx-Tk for emacs-orgmode@gnu.org; Thu, 06 Feb 2020 13:23:40 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:40196) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izloR-0006Ga-Lq for emacs-orgmode@gnu.org; Thu, 06 Feb 2020 13:23:39 -0500 Received: by mail-wm1-x329.google.com with SMTP id t14so1159735wmi.5 for ; Thu, 06 Feb 2020 10:23:39 -0800 (PST) Received: from freegnu (nat-eduroam-fr.ehess.fr. [193.48.45.220]) by smtp.gmail.com with ESMTPSA id o189sm439673wme.1.2020.02.06.10.23.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 10:23:37 -0800 (PST) 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: emacs-orgmode Hello, I've found that some strange results when outputing html from R. Do you have some insights on a potential solution? Best regards, Jeremie Org mode version 9.3.4 (9.3.4-elpa @ /home/djj/.emacs.d/elpa/org-20200206/) #+PROPERTY: header-args:R :eval yes :exports results :colnames yes :results output :output-dir images/ :cache yes :session *R* #+begin_src R :results output html library(xtable) x <- rnorm(100) y <- x + rnorm(100) print(xtable(summary(lm(y ~ x))),type="html") #+end_src #+RESULTS: #+begin_export html < < <
<
#+end_export ** Expected results #+begin_export html
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.0130 0.1023 -0.13 0.8991
x 1.0011 0.0987 10.14 0.0000
#+end_export From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dominique Dumont Subject: Re: org-babel strange html print in R Date: Fri, 07 Feb 2020 13:53:16 +0100 Message-ID: <3215656.Ko1QCt5if5@ylum> References: <875zgjh8wn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50615) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j038Q-0000uS-FB for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 07:53:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j038P-0001V9-JU for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 07:53:26 -0500 Received: from smtp5-g21.free.fr ([2a01:e0c:1:1599::14]:18716) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j038P-0001Mj-Ck for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 07:53:25 -0500 Received: from ylum.localnet (unknown [IPv6:2a01:e34:edf7:4710:1615:a316:eca1:edef]) (Authenticated sender: domi.dumont) by smtp5-g21.free.fr (Postfix) with ESMTPSA id 8E2445FF27 for ; Fri, 7 Feb 2020 13:53:19 +0100 (CET) In-Reply-To: <875zgjh8wn.fsf@gmail.com> 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: emacs-orgmode@gnu.org On Thursday, 6 February 2020 19:23:36 CET Jeremie Juste wrote: > I've found that some strange results when outputing html from R. > Do you have some insights on a potential solution? On my system, org-mode 3.6.1 provides the expected table. All the best From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: org-babel strange html print in R Date: Fri, 07 Feb 2020 14:38:53 +0100 Message-ID: <87d0aqa55e.fsf@gnu.org> References: <875zgjh8wn.fsf@gmail.com> <3215656.Ko1QCt5if5@ylum> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35061) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j03qY-0007OT-Pm for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 08:39:03 -0500 In-Reply-To: <3215656.Ko1QCt5if5@ylum> (Dominique Dumont's message of "Fri, 07 Feb 2020 13:53:16 +0100") 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: Dominique Dumont Cc: emacs-orgmode@gnu.org Hi Dominique, Dominique Dumont writes: > On Thursday, 6 February 2020 19:23:36 CET Jeremie Juste wrote: >> I've found that some strange results when outputing html from R. >> Do you have some insights on a potential solution? > > On my system, org-mode 3.6.1 This seems to be a *very* version of org-mode ;) -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jack Kamm Subject: Re: org-babel strange html print in R Date: Fri, 07 Feb 2020 06:51:07 -0800 Message-ID: <878sle1mec.fsf@gmail.com> References: <875zgjh8wn.fsf@gmail.com> <3215656.Ko1QCt5if5@ylum> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56904) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j04zK-000658-A5 for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 09:52:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j04zJ-0000xE-Ds for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 09:52:10 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:53746) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j04zJ-0000uk-82 for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 09:52:09 -0500 Received: by mail-pj1-x102b.google.com with SMTP id n96so1028423pjc.3 for ; Fri, 07 Feb 2020 06:52:08 -0800 (PST) In-Reply-To: <3215656.Ko1QCt5if5@ylum> 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: Dominique Dumont , emacs-orgmode@gnu.org Dominique Dumont writes: > On my system, org-mode 3.6.1 provides the expected table. My system produces the expected table as well (org 9.3.2, R 3.6.2). --Jack From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dominique Dumont Subject: Re: org-babel strange html print in R Date: Fri, 07 Feb 2020 16:23:59 +0100 Message-ID: <4060076.QsIcyZ59rY@ylum> References: <875zgjh8wn.fsf@gmail.com> <3215656.Ko1QCt5if5@ylum> <87d0aqa55e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39613) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j05UL-00074i-Mc for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 10:24:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j05UK-0007LM-Q5 for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 10:24:13 -0500 Received: from smtp5-g21.free.fr ([212.27.42.5]:35294) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j05UK-0007Ki-JM for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 10:24:12 -0500 Received: from ylum.localnet (unknown [IPv6:2a01:e34:edf7:4710:1615:a316:eca1:edef]) (Authenticated sender: domi.dumont) by smtp5-g21.free.fr (Postfix) with ESMTPSA id 7C6DA5FFA6 for ; Fri, 7 Feb 2020 16:24:07 +0100 (CET) In-Reply-To: <87d0aqa55e.fsf@gnu.org> 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: emacs-orgmode@gnu.org On Friday, 7 February 2020 14:38:53 CET Bastien wrote: > This seems to be a *very* version of org-mode ;) Bummer... I remember that I've used org-version to get the version number. I guess I have cut'n'pasted an unrelated number :-/ For the record, I've tested R and html output on Org mode version 9.3.1 Sorry for the confusion. All the best Dod 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 00:54:12 +0100 Message-ID: <87pneqnecb.fsf@gmail.com> References: <875zgjh8wn.fsf@gmail.com> <3215656.Ko1QCt5if5@ylum> <878sle1mec.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37447) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0DRy-0005Z2-A5 for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 18:54:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0DRx-000476-26 for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 18:54:18 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:33870) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0DRw-00046n-Qx for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 18:54:17 -0500 Received: by mail-wm1-x333.google.com with SMTP id s144so4161404wme.1 for ; Fri, 07 Feb 2020 15:54:16 -0800 (PST) In-Reply-To: <878sle1mec.fsf@gmail.com> (Jack Kamm's message of "Fri, 07 Feb 2020 06:51:07 -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 Kamm writes: > Dominique Dumont writes: > >> On my system, org-mode 3.6.1 provides the expected table. > > My system produces the expected table as well (org 9.3.2, R 3.6.2). > > --Jack Thanks for the info. Unfortunately I couldn't identify the issue I updated R and org (org 9.3.2, R 3.6.2). launched > emacs -Q - executed the following commands (add-to-list 'load-path "/home/djj/.emacs.d/elpa/ess-20200115.225") (add-to-list 'load-path "/home/djj/.emacs.d/elpa/julia-mode-20180816.2117") (require 'ess-site) (org-babel-do-load-languages 'org-babel-load-languages '( (R . t) )) but I'm still getting #+begin_src R :results output :cache no :session "R2" library(xtable) x <- rnorm(100) y <- x + rnorm(100) a <- summary(lm(y ~ x)) print(xtable(a),type="html") #+end_src #+RESULTS: #+begin_example < < <
<
#+end_example Best regards, Jeremie From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jack Kamm Subject: Re: org-babel strange html print in R Date: Fri, 07 Feb 2020 17:30:37 -0800 Message-ID: <874kw1uapu.fsf@gmail.com> References: <875zgjh8wn.fsf@gmail.com> <3215656.Ko1QCt5if5@ylum> <878sle1mec.fsf@gmail.com> <87pneqnecb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50018) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0EzF-0001lZ-0P for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 20:32:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0EzE-0005DD-0D for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 20:32:44 -0500 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:39563) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0EzD-0005Bl-PR for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 20:32:43 -0500 Received: by mail-pj1-x1034.google.com with SMTP id e9so1656991pjr.4 for ; Fri, 07 Feb 2020 17:32:43 -0800 (PST) In-Reply-To: <87pneqnecb.fsf@gmail.com> 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: Jeremie Juste Cc: emacs-orgmode@gnu.org Hi Jeremie, > Thanks for the info. > Unfortunately I couldn't identify the issue > I updated R and org (org 9.3.2, R 3.6.2). > but I'm still getting [the error] Sorry, I missed the initial property line where you set the ":session" header argument. When I set the ":session" header argument, I get the original buggy behavior that you report. It looks like the reason for this, is that the substrings like "tr>" match `comint-prompt-regexp', and so get stripped out by `org-babel-comint-with-output'. 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. 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. Long term, I am intending to contribute the full functionality in ob-session-async here, but that's still a ways off. [0] https://github.com/jackkamm/ob-session-async Jack 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: org-babel strange html print in R Date: Tue, 11 Feb 2020 13:16:26 +0800 Message-ID: <87blq5u2j9.fsf@gmail.com> References: <875zgjh8wn.fsf@gmail.com> Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35535) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1NuR-0003wi-Io for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 00:16:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1NuQ-0002ZK-6j for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 00:16:31 -0500 Received: from [223.104.247.49] (port=11558 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j1NuP-0002U1-Nv for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 00:16:30 -0500 In-reply-to: <875zgjh8wn.fsf@gmail.com> 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: Jeremie Juste Cc: emacs-orgmode@gnu.org You should try ~:results value html~. Here is what I got correctly: #+begin_src R :results value html library(xtable) x <- rnorm(100) y <- x + rnorm(100) print(xtable(summary(lm(y ~ x))),type="html") #+end_src #+RESULTS[<2020-02-11 13:14:59> 91ff0df2529284897e3585e3ec2e640290ee8308]: #+begin_export html
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.0064 0.1069 -0.06 0.9520
x 1.1066 0.1022 10.83 0.0000
#+end_export Jeremie Juste writes: > Hello, > > I've found that some strange results when outputing html from R. > Do you have some insights on a potential solution? > > Best regards, > Jeremie > > Org mode version 9.3.4 (9.3.4-elpa @ /home/djj/.emacs.d/elpa/org-20200206/) > > #+PROPERTY: header-args:R :eval yes :exports results :colnames yes :results output :output-dir images/ :cache yes :session *R* > > #+begin_src R :results output html > library(xtable) > x <- rnorm(100) > y <- x + rnorm(100) > print(xtable(summary(lm(y ~ x))),type="html") > #+end_src > > > #+RESULTS: > #+begin_export html > > > > > < > < > < > Estimate < > Std. Error < > t value < > Pr(>|t|) > < > > < > >
(Intercept) -0.0130 0.1023 -0.13 0.8991
x 1.0011 0.0987 10.14 0.0000
> #+end_export > > > ** Expected results > #+begin_export html > > > > >
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.0130 0.1023 -0.13 0.8991
x 1.0011 0.0987 10.14 0.0000
> #+end_export -- [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jack Kamm Subject: Re: org-babel strange html print in R Date: Tue, 11 Feb 2020 07:40:44 -0800 Message-ID: <87r1z1xhc3.fsf@gmail.com> References: <875zgjh8wn.fsf@gmail.com> <87blq5u2j9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:45826) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1Xfa-0003WA-QR for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 10:41:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1XfZ-0007er-Iw for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 10:41:50 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:40521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1XfZ-0007ck-BT for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 10:41:49 -0500 Received: by mail-pf1-x431.google.com with SMTP id q8so5668687pfh.7 for ; Tue, 11 Feb 2020 07:41:49 -0800 (PST) In-Reply-To: <87blq5u2j9.fsf@gmail.com> 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: numbchild@gmail.com, Jeremie Juste Cc: emacs-orgmode@gnu.org Hi, stardiviner writes: > You should try ~:results value html~. Here is what I got correctly: Yes, this seems like the best solution for this case. On the other hand, it would be desirable if ":results output" didn't mangle the output, due to trying to clean up prompts. There is probably some corner case out there where this is a more serious issue -- but for this case, it seems best to just use ":results value html". I was planning to submit my implementation of ":session :results output" that avoids the prompt mangling [0], but now I'm leaning towards putting this off, until a more compelling case arises to justify it. [0] https://github.com/jackkamm/ob-session-async/blob/master/lisp/ob-session-async-R.el From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremie Juste Subject: Re: org-babel strange html print in R Date: Tue, 11 Feb 2020 18:30:20 +0100 Message-ID: <87tv3xhw0j.fsf@gmail.com> References: <875zgjh8wn.fsf@gmail.com> <87blq5u2j9.fsf@gmail.com> <87r1z1xhc3.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34491) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1ZMi-0000uz-5a for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 12:30:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1ZMf-0007gS-Fu for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 12:30:28 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:53297) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1ZMe-0007cg-Su for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 12:30:25 -0500 Received: by mail-wm1-x334.google.com with SMTP id s10so4651600wmh.3 for ; Tue, 11 Feb 2020 09:30:23 -0800 (PST) In-Reply-To: <87r1z1xhc3.fsf@gmail.com> (Jack Kamm's message of "Tue, 11 Feb 2020 07:40:44 -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, Thanks for the input. I didn't see the full mail of stardiviner for some reason. :results value html in the following code generates an error for me. (Org mode version 9.2.3,R version 3.6.2). but :results value output the "html" in an org-table format #+begin_src R :results value html library(xtable) x <- rnorm(100) y <- x + rnorm(100) print(xtable(summary(lm(y ~ x))),type="html") #+end_src Best regards, Jeremie Jack Kamm writes: > Hi, > > stardiviner writes: > >> You should try ~:results value html~. Here is what I got correctly: > > Yes, this seems like the best solution for this case. > > On the other hand, it would be desirable if ":results output" didn't > mangle the output, due to trying to clean up prompts. There is probably > some corner case out there where this is a more serious issue -- but for > this case, it seems best to just use ":results value html". > > I was planning to submit my implementation of ":session :results output" > that avoids the prompt mangling [0], but now I'm leaning towards putting > this off, until a more compelling case arises to justify it. > > [0] https://github.com/jackkamm/ob-session-async/blob/master/lisp/ob-session-async-R.el From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jack Kamm Subject: Re: org-babel strange html print in R Date: Tue, 11 Feb 2020 15:25:57 -0800 Message-ID: <87blq4k8oq.fsf@gmail.com> References: <875zgjh8wn.fsf@gmail.com> <87blq5u2j9.fsf@gmail.com> <87r1z1xhc3.fsf@gmail.com> <87tv3xhw0j.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:40168) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1eun-0003zi-PX for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 18:26:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1eum-0000LE-Rq for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 18:26:01 -0500 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:33973) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1eum-0000I5-MP for emacs-orgmode@gnu.org; Tue, 11 Feb 2020 18:26:00 -0500 Received: by mail-pj1-x102a.google.com with SMTP id f2so1243413pjq.1 for ; Tue, 11 Feb 2020 15:26:00 -0800 (PST) In-Reply-To: <87tv3xhw0j.fsf@gmail.com> 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: Jeremie Juste Cc: emacs-orgmode@gnu.org Hi, Jeremie Juste writes: > :results value html in the following code generates an error for me. > (Org mode version 9.2.3,R version 3.6.2). > but :results value output the "html" in an org-table format Hmm, I can confirm that ":session :results value html" is working for me, same as for stardiviner. Could you give more info about the error you're seeing? I'm using R 3.6.2 and Org 9.4. But I'd be surprised if it doesn't work for Org 9.2 -- git blame suggests that html output has been supported in ob-R since at least 2015. But it wouldn't hurt to upgrade to the latest released version of Org (9.3). From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: org-babel strange html print in R Date: Wed, 12 Feb 2020 15:05:02 +0800 Message-ID: <878sl8e13b.fsf@gmail.com> References: <875zgjh8wn.fsf@gmail.com> <87blq5u2j9.fsf@gmail.com> <87r1z1xhc3.fsf@gmail.com> <87tv3xhw0j.fsf@gmail.com> Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52192) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1m6g-00012s-Mn for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 02:06:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1m6f-00014y-Hs for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 02:06:46 -0500 Received: from [112.17.247.90] (port=61780 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j1m6d-000129-L0 for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 02:06:45 -0500 In-reply-to: <87tv3xhw0j.fsf@gmail.com> 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: Jeremie Juste Cc: Jack Kamm , emacs-orgmode@gnu.org =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Jeremie Juste writes: > Hello, > > Thanks for the input. > I didn't see the full mail of stardiviner for some reason. About this, I found Gmail put my emails into Spams folder. I can't figure o= ut what reasons. I also found similar situations in some people in Emacs-help = guys. Anyway, If you can, please report my emails "Not Spam". Thanks :) > > :results value html in the following code generates an error for me. > (Org mode version 9.2.3,R version 3.6.2). > but :results value output the "html" in an org-table format > > #+begin_src R :results value html > library(xtable) > x <- rnorm(100) > y <- x + rnorm(100) > print(xtable(summary(lm(y ~ x))),type=3D"html") > #+end_src > > Best regards, > Jeremie > > Jack Kamm writes: > >> Hi, >> >> stardiviner writes: >> >>> You should try ~:results value html~. Here is what I got correctly: >> >> Yes, this seems like the best solution for this case. >> >> On the other hand, it would be desirable if ":results output" didn't >> mangle the output, due to trying to clean up prompts. There is probably >> some corner case out there where this is a more serious issue -- but for >> this case, it seems best to just use ":results value html". >> >> I was planning to submit my implementation of ":session :results output" >> that avoids the prompt mangling [0], but now I'm leaning towards putting >> this off, until a more compelling case arises to justify it. >> >> [0] https://github.com/jackkamm/ob-session-async/blob/master/lisp/ob-ses= sion-async-R.el =2D --=20 [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 =20=20=20=20=20=20 =2D----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5Do/gUHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsN8ewf/YkjUlLOAAAtpBRgOdIZg2N0JKxVt vwXxH5G+5VOJNgH0avDRrGnI+2r5Kooqs0lpfIjoy5yi9tkG9Z4GShKa2iYP2wLA hbsN0OJxZ3ChdCjbyW2ABNdzCVL6T3oremxy8DzdZGrM2sSmFFSKK+N8s/PI7IJP 2wE7jjUCoNFcB6XGodcZiRXE+Ms/k1gPfzyJxvbeOdX1GQriQE8ecofEpomkz3F0 VQZ/sgec9mAsKZMC9054H0br5DT1c3Wo/DnaKnVpw24wrwWyMJSj02XSau+GIFLq 3hAx01mrP4ud7aUs/TnwCfaVrvH0i/4iO+KhJr6KyZB2gPMTXTs4nuf5Zw=3D=3D =3DdAR8 =2D----END PGP SIGNATURE-----