While testing my response to Viktor's question, I ran into a problem. I used a test file that is slightly modified from a previous post of Tom Dye's:
--8<---------------cut here---------------start------------->8--- * R tables #+TBLNAME: tbl-1 | column1 | column2 | |---------+---------| | 45 | 34 | | 77 | 56 | #+tblname: tbl-2 | col1 | col2 | |------+------| | a | b | | c | d | #+tblname: tbl-3 | c1 | c2 | |----+----| | A | B | | C | D | #+BEGIN_SRC R :var x=tbl-1 :var y=tbl-2 :var z=tbl-3 :colnames yes :exports both :results value z #+END_SRC --8<---------------cut here---------------end--------------->8--- Evaluating the code block correctly produces the result ,---- | | #+results: | | c1 | c2 | | |----+----| | | A | B | | | C | D | `---- but exporting (to ascii, PDF, HTML or ODT) chops off the first row of the result. For example, here is the ascii: ,---- | | c1 c2 | ----+---- | C D `---- HTML produces: ,---- | <pre class="example"> | c1 c2 | 1 C D | </pre> `---- Latex: ,---- | \begin{center} | \begin{tabular}{ll} | c1 & c2 \\ | \hline | C & D \\ | \end{tabular} | \end{center} `---- ODT: ,---- | <table:table table:name="" table:style-name="OrgTable"> | <table:table-column table:style-name="OrgTableColumn"/> | <table:table-column table:style-name="OrgTableColumn"/> | | <table:table-header-rows> | <table:table-row><table:table-cell table:style-name="OrgTblCellT"><text:p text:style-name="OrgTableHeadingLeft">c1</text:p></table:table-cell> | | <table:table-cell table:style-name="OrgTblCellT"><text:p text:style-name="OrgTableHeadingLeft">c2</text:p></table:table-cell> | </table:table-row> | | </table:table-header-rows> | | <table:table-rows> | <table:table-row><table:table-cell table:style-name="OrgTblCellTB"><text:p text:style-name="OrgTableContentsLeft">C</text:p></table:table-cell> | | <table:table-cell table:style-name="OrgTblCellTB"><text:p text:style-name="OrgTableContentsLeft">D</text:p></table:table-cell> | </table:table-row> | | </table:table-rows> | | </table:table> `---- Versions: GNU Emacs 24.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of 2011-09-13 Org-mode version 7.7 (release_7.7.396.gfaaa) Nick