[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [babel] Code for simple set-operations on two tables. Asking for som
From: |
Marc-Oliver Ihm |
Subject: |
[O] [babel] Code for simple set-operations on two tables. Asking for some input. |
Date: |
Mon, 26 Dec 2011 12:00:49 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
Hello,
Please find attached the elisp-file and a tutorial (as an org-file) for
org-babel-table-proc.
It provides some simple set-operations (mostly merge and intersect), which
treat org-mode tables as sets.
An example for merging two tables would be:
#+name: lower
| 2 | b |
| 4 | d |
| 5 | e |
| 6 | h |
#+name: upper
| 1 | A |
| 3 | C |
| 4 | D |
| 10 | J |
| 2 | B |
#+begin_src emacs-lisp :var t1=lower :var t2=upper
(babel-table-proc-merge t1 t2)
#+end_src
#+results:
| 1 | | A |
| 2 | b | B |
| 3 | | C |
| 4 | d | D |
| 5 | e | |
| 6 | h | |
| 10 | | J |
which merges the two input tables lower and upper into a single table, even, if
they do not have all
keys (from the first column) in common.
In general this merges information from two different sources without loosing
anything.
The package org-babel-table-proc provides these and a few other operations, but
definitely still needs
some debugging and polishing.
However, before finishing this work, I would like to ask, if something like
this is already present
in babel or the library of babel ?
Also, I am not sure, which prefix to use for packages and functions; is
org-babel-table-proc the right name or can
it be shortened to ob-table-proc.
Any input would be very welcome !
With kind regards, Marc-Oliver Ihm
org-babel-table-proc.el
Description: Text document
org-babel-table-proc.org
Description: Text document
- [O] [babel] Code for simple set-operations on two tables. Asking for some input.,
Marc-Oliver Ihm <=