emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Hannon <jm_hannon@yahoo.com>
To: Charles <millarc@verizon.net>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: How to apply multiple TBLFM rules?
Date: Mon, 7 May 2012 18:41:53 -0700 (PDT)	[thread overview]
Message-ID: <1336441313.68664.YahooMailNeo@web161906.mail.bf1.yahoo.com> (raw)
In-Reply-To: <4FA8705A.4060907@verizon.net>

Charles <millarc@verizon.net> 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 @4$1..@4$2) (n @1$4))
#+TBLFM: @2$4='(sbe pst-check (row @5$1..@5$2) (n @1$5))
#+TBLFM: @2$4='(sbe pst-check (row @6$1..@6$2) (n @1$6))
#+TBLFM: @2$4='(sbe pst-check (row @7$1..@7$2) (n @1$7))

  reply	other threads:[~2012-05-08  1:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 22:00 How to apply multiple TBLFM rules? Michael Hannon
2012-05-08  1:01 ` Charles
2012-05-08  1:41   ` Michael Hannon [this message]
2012-05-08  8:11   ` Bastien
2012-05-08 20:21     ` Michael Hannon
2012-05-10  6:52       ` Bastien
2013-04-02 13:33       ` [PATCH] Was: " Ippei FURUHASHI
2013-04-04 13:09         ` Bastien
2013-04-06 13:07           ` Ippei FURUHASHI
2013-04-06 13:15             ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336441313.68664.YahooMailNeo@web161906.mail.bf1.yahoo.com \
    --to=jm_hannon@yahoo.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=millarc@verizon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).