On 2015-05-24 Sun 00:01, Thomas S. Dye wrote: > Titus von der Malsburg writes: > >> I’m exporting the following document to LaTeX >> >> #+BEGIN_SRC R :results table :exports results :colnames yes :rownames yes >> x <- data.frame(a=1:2, b=3:4) >> rownames(x) <- c("One:", "Two:") >> #+END_SRC >> >> and expect a table with the following layout: >> >> a b >> One: 1 3 >> Two: 2 4 >> >> Instead I got this: >> >> x >> 1 One: >> 2 Two: > > You got the result of rownames(x), which is expected. The table you > expect is given by the following code: Ah, I see, thanks. Although the results is still somewhat unexpected. c("One:", "Two:") doesn’t have rownames and colnames. So org apparently made them up when generating the table. Titus > > #+BEGIN_SRC R :results table :exports results :colnames yes :rownames yes > x <- data.frame(a=1:2, b=3:4) > rownames(x) <- c("One:", "Two:") > x > #+END_SRC > > #+results: > | | a | b | > |------+---+---| > | One: | 1 | 3 | > | Two: | 2 | 4 | > > All the best, > Tom