emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: Re: join two or more tables
Date: Sun, 18 Aug 2019 13:34:30 +0200	[thread overview]
Message-ID: <87k1baogft.fsf@mat.ucm.es> (raw)
In-Reply-To: 87blwmg34d.fsf@Rainer.invalid

[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]

>>> "AG" == Achim Gratz <Stromeko@nexgo.de> writes:

   > Uwe Brauer writes:
   >> Thanks I knew about it, but it seems very sophisticated and column, not
   >> row based.

   > Well, if simple-minded suits you (i.e. the columns are known to have the
   > same order):

   > Tables in Org are lists with rows as their elements, and a row is either
   > a symbol or a list of column elements.  So just concatenating the two
   > lists does (almost) the right thing.  If you know the row has headers,
   > you need to skip until the first real data row in the second table
   > (i.e. skip the first row, the first header and then resume the concat).

   > Your other option is just grabbing the text of both tables, emit it as a
   > single entity (again you may want to remove the header on the second
   > table) and then call org-align-table on it.


Hm, thanks but could you post an example (the one I finally used is
based on R and goes as follows


 #+tblname: TC
 | a | b | c |
 |---+---+---|
 | 1 | 2 | 3 |
 | 7 | 8 | 9 |
 
 #+tblname: TD
 |  a |  b |  c |
 |----+----+----|
 |  4 |  5 |  6 |
 | 10 | 11 | 12 |

 #+begin_src R :colnames t :var t1=TC t2=TD
 rbind(t1, t2)
 #+end_src

 #+RESULTS:
 |  a |  b |  c |
 |----+----+----|
 |  1 |  2 |  3 |
 |  7 |  8 |  9 |
 |  4 |  5 |  6 |
 | 10 | 11 | 12 |

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]

  reply	other threads:[~2019-08-18 11:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-18  8:23 join two or more tables Uwe Brauer
2019-08-18  8:31 ` Uwe Brauer
2019-08-18  8:46   ` [SOLVED] (was: join two or more tables) Uwe Brauer
2019-08-18  8:59     ` [rows not columns] (was: [SOLVED]) Uwe Brauer
2019-08-18 11:00   ` join two or more tables Jude DaShiell
2019-08-18 10:21 ` Ken Mankoff
2019-08-18 10:24   ` Uwe Brauer
2019-08-18 10:49     ` Achim Gratz
2019-08-18 11:34       ` Uwe Brauer [this message]
2019-08-23 18:09         ` Achim Gratz
  -- strict thread matches above, loose matches on Subject: below --
2019-08-23  9:55 emanuel.charpentier
2019-08-23 10:54 ` Uwe Brauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1baogft.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).