2

I have two org tables

#+TBLNAME: contact_info
| Name       |  ID | E-Mail          |
|------------+-----+-----------------|
| Washington | 001 | george@usa.pres |
| Adams      | 002 | john@usa.pres   |
| Jefferson  | 003 | thomas@usa.pres |
| Madison    | 004 | james@usa.pres  |

#+TBLNAME: ages
| Name | Age |
|------+-----|
|      |     |
|------+-----|
| Mean |   0 |
#+TBLFM: @>$2=vmean(@<<$2..@>>$2)

I would like the first column of ages to synchronize with the first column of contact_info. In other words, I would like ages to look like

#+TBLNAME: ages
| Name       | Age |
|------------+-----|
| Washington |     |
| Adams      |     |
| Jefferson  |     |
| Madison    |     |
|------------+-----|
| Mean       |   0 |
#+TBLFM: @>$2=vmean(@<<$2..@>>$2)

Furthermore, if I change contact_info to

#+TBLNAME: contact_info
| Name       |  ID | E-Mail          |
|------------+-----+-----------------|
| Washington | 001 | george@usa.pres |
| Adams      | 002 | john@usa.pres   |
| Madison    | 004 | james@usa.pres  |
| Monroe     | 005 | james1@usa.pres |
| Adams      | 006 | john1@usa.pres  |

then I would like ages to update to

#+TBLNAME: ages
| Name       | Age |
|------------+-----|
| Washington |     |
| Adams      |     |
| Madison    |     |
| Monroe     |     |
| Adams      |     |
|------------+-----|
| Mean       |   0 |
#+TBLFM: @>$2=vmean(@<<$2..@>>$2)

Is this sort of thing possible?

  • You can pull data using remote() in the formula: orgmode.org/manual/References.html, but I don't think there's a way to add or remove rows by means of tables only. However, you could have an Org-babel code block in the document, which outputs a table. If the later will answer your question, please let me know, it's a really simple bit of code though. – wvxvw Jul 8 '15 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.