emacs-orgmode
[Top][All Lists]
Advanced

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

[O] extract a column from a table but but an name on the new table


From: Uwe Brauer
Subject: [O] extract a column from a table but but an name on the new table
Date: Thu, 24 May 2018 15:08:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Hi

Thierry Banel one of the authors of orgtbl-aggregate.el

Suggested to me the following code, if just want to extract one column
of a table.


#+TBLNAME: raw-data
| 1 | a | 3 |
| 2 | b | 4 |
| 3 | c | 6 |
| 4 | d | 7 |

#+BEGIN_SRC elisp :var data=raw-data
(mapcar (lambda (line)
            (list (nth 2 line)))
         data)
#+END_SRC

#+RESULTS:
| 3 |
| 4 |
| 6 |
| 7 |

It works nicely but how could I obtain the result with a table name,
like:

#+TBLNAME: RESULTS
| 3 |
| 4 |
| 6 |
| 7 |

Or something like this?

Thanks

Uwe Brauer 




reply via email to

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