On 26/05/2018 10:32, Uwe Brauer wrote:


    > 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.
You may like the out-of-the-boxtable remote references:

| 3 |
| 4 |
| 6 |
| 7 |
|   |
|   |
#+TBLFM: $1=remote(raw-data,@@#$3)

The downside is that you need to create an empty table with the right size before filling it with C-u C-c *


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


I get a result. Maybe you used downcase "notasA" where uppercase "NotasA" was expected?

#+begin_src R  :var notasA=NotasA
summary(notasA)
#+end_src

#+RESULTS:
| Min.   :3.00 |
| 1st Qu.:3.75 |
| Median :5.00 |
| Mean   :5.00 |
| 3rd Qu.:6.25 |
| Max.   :7.00 |



Reply via email to