emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to apply multiple TBLFM rules?


From: Michael Hannon
Subject: Re: [O] How to apply multiple TBLFM rules?
Date: Mon, 7 May 2012 18:41:53 -0700 (PDT)

Charles <address@hidden> wrote:

> I'm fairly new to Org and did an experiment. Perhaps only one #+TBLFM: per
> table is allowed since the plural is used
.
.
.

Thanks, Charlie.  I think you must be correct.  Since posting my message, I've
run across the notion of using " C-c ' " within a table to edit formulas.  When
I do that and add both of the formulas in my little example, I get:

    #+TBLFM: @1$3='(+ 10 7)::@2$3='(+ 11 9)::@3$1=42

when I return from the editor.  I.e., the two formulas are in a single line,
separated by a double colon, and both formulas get correctly evaluated when I
do C-u C-c C-c.  This is even though I added them as one formula per line in
the editor.

The background here is that I was trying to understand the appended table,
taken from:

    http://www.jstatsoft.org/v46/i03

which seems to use repeated TBLFM lines.  I beat my head against this for a
good long time this afternoon.  It just doesn't work on my system, but I'm
also new enough to this stuff that my first (and reasonable) assumption is
that I'm doing something wrong (which may still be the case here, for that
matter).

-- Mike



#+results: pascals-triangle
| 0 | 1    | 2    | 3    | 4    | 5    |
|---+------+------+------+------+------|
|   | pass | pass | pass | pass | pass |
| 1 |      |      |      |      |      |
| 1 | 1    |      |      |      |      |
| 1 | 2    | 1    |      |      |      |
| 1 | 3    | 3    | 1    |      |      |
| 1 | 4    | 6    | 4    | 1    |      |
| 1 | 5    | 10   | 10   | 5    | 1    |
#+TBLFM: @2$2='(sbe pst-check (row @3$1) (n @1$3))
#+TBLFM: @2$3='(sbe pst-check (row @address@hidden) (n @1$4))
#+TBLFM: @2$4='(sbe pst-check (row @address@hidden) (n @1$5))
#+TBLFM: @2$4='(sbe pst-check (row @address@hidden) (n @1$6))
#+TBLFM: @2$4='(sbe pst-check (row @address@hidden) (n @1$7))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]