[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [join rows] (was: join tables from different files)
From: |
tbanelwebmin |
Subject: |
Re: [join rows] (was: join tables from different files) |
Date: |
Mon, 8 Jun 2020 08:18:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
Le 07/06/2020 à 17:09, Uwe Brauer a écrit :
> "t" == tbanelwebmin <tbanelwebmin@free.fr> writes:
>
> Yes you can.
> Use an org-id
>
> Thanks! Nice!
>
>
> I have a another question in this context:
> can I join, say 4 tables, but row wise?
> Say I have
>
> #+TBLNAME: RK
> #+ATTR_HTML: :border 2 :rules all :frame border
> | met | Q1 | Q2 | Q3 | total |
> |-----+----+----+-----+-------|
> | RK | 1 | 1 | 0.5 | 2.5 |
> #+TBLFM: $5=$2+$3+$4
>
> #+TBLNAME: SVD
> #+ATTR_HTML: :border 2 :rules all :frame border
> | met | Q1: | Q2 | Q3 | total |
> |-----+-----+----+----+-------|
> | SVD | 0.5 | 1 | 1 | 2.5 |
> #+TBLFM: $5=$2+$3+$4;f1
>
> #+TBLNAME: MIN
> #+ATTR_HTML: :border 2 :rules all :frame border
> | met | Q1 | Q2 | total |
> |-----+----+-----+-------|
> | MIN | 2 | 0.5 | 2.5 |
> #+TBLFM: $4=$2+$3
>
> #+TBLNAME: BDF
> #+ATTR_HTML: :border 2 :rules all :frame border
> | met | Q1 | Q2 | total |
> |-----+------+------+-------|
> | MIN | 0.75 | 1.75 | 2.5 |
> #+TBLFM: $4=$2+$3
>
> Since they don't have the same amount of columns, I'd like to join the 4
> tables like this
> #+TBLNAME: Total1
> #+ATTR_HTML: :border 2 :rules all :frame border
> | met | Q1 | Q2 | Q3 | total |
> |-----+-----+----+-----+-------|
> | RK | 1 | 1 | 0.5 | 2.5 |
> |-----+-----+----+-----+-------|
> | SVD | 0.5 | 1 | 1 | 2.5 |
> #+TBLFM: $5=$2+$3+$4;f1
>
> #+TBLNAME: Total2
> #+ATTR_HTML: :border 2 :rules all :frame border
> | met | Q1 | Q2 | total |
> |-----+------+------+-------|
> | MIN | 2 | 0.5 | 2.5 |
> |-----+------+------+-------|
> | MIN | 0.75 | 1.75 | 2.5 |
> #+TBLFM: $4=$2+$3
>
> Is this possible?
>
> regards
> Uwe Brauer
I'm not aware of anything specific for this purpose. A starting point could be
the `append' lisp function:
#+begin_src elisp :var table1=RK :var table2=SVD :colnames t
(append table1 table2)
#+end_src
#+RESULTS:
| met | Q1: | Q2 | Q3 | total |
|-----+-----+----+-----+-------|
| RK | 1 | 1 | 0.5 | 2.5 |
| SVD | 0.5 | 1 | 1 | 2.5 |
- join tables from different files, Uwe Brauer, 2020/06/06
- Re: join tables from different files, tbanelwebmin, 2020/06/07
- [join rows] (was: join tables from different files), Uwe Brauer, 2020/06/07
- Re: [join rows] (was: join tables from different files),
tbanelwebmin <=
- Re: [join rows] (was: join tables from different files), Jude DaShiell, 2020/06/08
- Re: [join rows], Uwe Brauer, 2020/06/08
- Re: [join rows], tomas, 2020/06/08
- Re: [join rows], Jude DaShiell, 2020/06/08
- Re: [join rows], Uwe Brauer, 2020/06/08
- Re: [join rows], Uwe Brauer, 2020/06/08