[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] extract a column from a table but but an name on the new table
From: |
Uwe Brauer |
Subject: |
Re: [O] extract a column from a table but but an name on the new table |
Date: |
Sat, 26 May 2018 10:32:36 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> You may name the Lisp block like that:
> --------------------------------------
> #+TBLNAME: raw-data
> | 1 | a | 3 |
> | 2 | b | 4 |
> | 3 | c | 6 |
> | 4 | d | 7 |
Thank you!
BTW I found it strange that the extracting function does not exist in
vanilla org.
My situation is a bit different, since I later want to use R.
So I have
#+TBLNAME: raw-data
| 1 | a | 3 |
| 2 | b | 4 |
| 3 | c | 6 |
| 4 | d | 7 |
#+NAME: NotasA
#+BEGIN_SRC elisp :var data=raw-data
(mapcar (lambda (line)
(list (nth 2 line)))
data)
#+END_SRC
#+RESULTS: NotasA
| 3 |
| 4 |
| 6 |
| 7 |
#+begin_src R :var notasA=notasA
summary(notasA)
#+end_src
And the last call does not work. It seems that R needs a table name.....
Uwe
smime.p7s
Description: S/MIME cryptographic signature