From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shiyuan Subject: Babel-R TBLFM example Date: Tue, 24 Jun 2014 23:55:46 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e01177721dae64604fca3905b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzh7V-0005o4-Mq for emacs-orgmode@gnu.org; Wed, 25 Jun 2014 02:55:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wzh7U-0007Sb-7v for emacs-orgmode@gnu.org; Wed, 25 Jun 2014 02:55:49 -0400 Received: from mail-vc0-x22f.google.com ([2607:f8b0:400c:c03::22f]:40444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzh7U-0007ST-2N for emacs-orgmode@gnu.org; Wed, 25 Jun 2014 02:55:48 -0400 Received: by mail-vc0-f175.google.com with SMTP id hy4so1455992vcb.34 for ; Tue, 24 Jun 2014 23:55:47 -0700 (PDT) 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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --089e01177721dae64604fca3905b Content-Type: text/plain; charset=UTF-8 Hi all, I am looking at the Babel R example in http://orgmode.org/worg/org-tutorials/org-R/org-R.html This short example show how to use code block in Org Tables. The example first makes an org-mode table, which I can follow and reproduce the result: #+name: tbl-example-data() #+begin_src R runif(n=5, min=0, max=1) #+end_src #+RESULTS: tbl-example-data | 0.118510485393927 | | 0.742342338664457 | | 0.438421099446714 | | 0.0867570964619517 | | 0.604204315226525 | Then it defines r source code block and use TBLFM #+name: R-mean(x) #+begin_src R mean(x) #+end_src #+RESULTS: R-mean #+tblname: summaries | mean | |--------| | #ERROR | #+TBLFM: @2$1='(sbe "R-mean" (x "tbl-example-data()")) When I export to html(C-c C-e h o), the #+TBLFM seems to be ignored and shows no effect. When I place my cursor in the table and recalculate the table formula using C-u C-c C-c in the table. I got an error as shown above. In the *Message* buffer, I can see the following messages. byte-code: Beginning of buffer [8 times] Re-applying formulas to full table... Re-applying formula to field: @2$1 Re-applying formulas to full table...(line 1) Re-applying formula to field: @2$1 Re-applying formulas to 1 lines...done Re-applying formulas...done [2 times] Any steps I missed? I am using org mode 8.2.6 Also, I found this tutorial for org-R http://orgmode.org/worg/org-tutorials/org-R/org-R.html, however, the org-R-apply function seems no longer available in my org mode 8.2.6. Is org-R supposed to be deprecated? Thanks. Shiyuan --089e01177721dae64604fca3905b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,=C2=A0
=C2=A0 =C2=A0 I am looking at the Babel = R example in=C2=A0

This short example show how to use code block in Org Tables.=C2= =A0
The example first makes an org-mode table, which I can follow= and reproduce the result:=C2=A0

#+name: tbl-= example-data()
#+begin_src R=C2=A0
runif(n=3D5, min=3D0, max=3D1)
#+end_src

#+RESULTS: tbl-example-data
|= =C2=A00.118510485393927 |
| =C2=A00.742342338664457 |
= | =C2=A00.438421099446714 |
| 0.0867570964619517 |
| =C2=A00.604204315226525 |

Then it defines r source code block and use TBLFM=C2= =A0

#+name: R-mean(x)
#+begin_src R= =C2=A0
mean(x)
#+end_src

#+RESULTS: R-mean=

#+tblname: summaries
| mean =C2=A0 |
|--------|
| #ERROR |
#+TBLFM: @2$1=3D'(sbe= "R-mean" (x "tbl-example-data()"))

When I export to html(C-c C-e h o), the =C2=A0#+T= BLFM seems to be ignored and shows =C2=A0no effect. When I place my cursor = in the table and recalculate the table formula using C-u C-c C-c in the tab= le. I got an error as shown above. =C2=A0 In the *Message* buffer, I can se= e the following messages.
byte-code: Beginning of buffer [8 times]
Re-applying fo= rmulas to full table...
Re-applying formula to field: @2$1
<= div>Re-applying formulas to full table...(line 1)
Re-applying for= mula to field: @2$1
Re-applying formulas to 1 lines...done
Re-applying formulas.= ..done [2 times]

Any steps I missed? I am us= ing org mode 8.2.6

Also, I found this tutorial for= org-R h= ttp://orgmode.org/worg/org-tutorials/org-R/org-R.html, however, the org= -R-apply function seems no longer available in my org mode 8.2.6. Is org-R = supposed to be deprecated?=C2=A0

Thanks.=C2=A0

Shiyuan=C2=A0

=C2=A0=C2=A0
--089e01177721dae64604fca3905b--