emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Russell Adams <RLAdams@AdamsInfoServ.Com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Spreadsheet FR
Date: Fri, 2 Apr 2010 09:55:16 -0500	[thread overview]
Message-ID: <20100402145516.GC7194@thinkpad.adamsinfoserv.com> (raw)
In-Reply-To: <878w95sym0.fsf@stats.ox.ac.uk>

On Fri, Apr 02, 2010 at 10:44:23AM -0400, Dan Davison wrote:
> How about keeping a master table containing all the information, and
> then generating narrowed views as separate tables? The babel way to do
> this would be to have a block function "filter-table" (provided below)
> and then call it where needed:
> 
> #+TBLNAME: lime-table
> | *Lime* | *Cost* |
> |--------+--------|
> | Y      |      1 |
> | Y      |      2 |
> | Y      |      2 |
> | N      |      3 |
> | N      |      4 |
> | Y      |      5 |
> | Total  |     17 |
> #+TBLFM: @8$2=vsum(@-I..@-II)
> 
> #+call: filter-table(table=lime-table, field=0, value="Y")
> 
> #+results: filter-table(table=lime-table, field=0, value="Y")
> | *Lime* | *Cost* |
> |--------+--------|
> | Y      |      1 |
> | Y      |      2 |
> | Y      |      2 |
> | Y      |      5 |
> 
> As you can see I got rid of a few horizontal separator lines, and we
> don't currently have totals. I'll suggest fixes for that below, but my
> main point is that although it may make sense to extend org-mode, it's
> already easy to do this in org-babel.

That's a better way to do it than properties in my opinion.

Whether extension was required or not, my only point was that for
small lists the only reason I still use OO or Excel was for the
ability to dynamically narrow a list.

Given org narrows outlines, I thought it might fit.

I'll have to play with babel now!

> OK, so I hard wired a 6 into the TBLFM line. Perhaps someone can tell me
> how to refer to the last line of the table. Also, it might be nice if
> babel could apply the table formula automaticaly after generating the
> table.

This is why I use @-I..@-II, the separators are your cues. There's an
LR symbol, but I don't use it often.

That alone is a good reason to make sure separator lines are preserved.

Thanks.

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

  reply	other threads:[~2010-04-02 14:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 21:46 Spreadsheet FR Russell Adams
2010-04-02  7:49 ` Carsten Dominik
2010-04-02  8:16   ` Russell Adams
2010-04-02 13:00     ` Darlan Cavalcante Moreira
2010-04-04  7:01     ` Carsten Dominik
2010-04-04 16:46       ` Xiao-Yong Jin
2010-04-04 20:19         ` Russell Adams
2010-04-05  2:39           ` Xiao-Yong Jin
2010-04-02 14:44   ` Dan Davison
2010-04-02 14:55     ` Russell Adams [this message]
2010-04-02 17:09       ` Russell Adams
2010-04-02 20:43     ` Matt Lundin
2010-04-02 14:26 ` Matt Lundin

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=20100402145516.GC7194@thinkpad.adamsinfoserv.com \
    --to=rladams@adamsinfoserv.com \
    --cc=emacs-orgmode@gnu.org \
    /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).