Re: [O] org-mode R using xtable produces strange output
Brilliant! Thank you so much. Best wishes, Brian > On 20 Mar 2018, at 16:47, Berry, Charleswrote: > > > >> On Mar 19, 2018, at 4:44 PM, Brian Shine wrote: >> >> I am using xtable to produce summary tables of linear models, specifying the >> output as latex. If I just run the code in R, I get the correct output. >> However, the latex output in the org document contains a lot of “|”s. I >> think this is because the header of the table contains some code to make “p >> > |t|”, where the vertical lines are to indicate “absolute value of t”. My >> guess is that when the output is written to the results section, org >> interprets the “|” signs as an org-table and tries to be helpful by adding >> more of them to make up the correct number of columns. > > > See > > (info "(org) results") > > and note the difference between `:results output' and `:results value' (the > default). > > Since you want the printed version of the R object, you should use > > `:results output latex' > > to pass the printed output to the org #+Results or > > `:results raw :wrap export latex' > > to pass the unadorned value. In your use case they seem to produce the same > #+Results. > > HTH, > > Chuck
Re: [O] org-mode R using xtable produces strange output
> On Mar 19, 2018, at 4:44 PM, Brian Shinewrote: > > I am using xtable to produce summary tables of linear models, specifying the > output as latex. If I just run the code in R, I get the correct output. > However, the latex output in the org document contains a lot of “|”s. I > think this is because the header of the table contains some code to make “p > > |t|”, where the vertical lines are to indicate “absolute value of t”. My > guess is that when the output is written to the results section, org > interprets the “|” signs as an org-table and tries to be helpful by adding > more of them to make up the correct number of columns. See (info "(org) results") and note the difference between `:results output' and `:results value' (the default). Since you want the printed version of the R object, you should use `:results output latex' to pass the printed output to the org #+Results or `:results raw :wrap export latex' to pass the unadorned value. In your use case they seem to produce the same #+Results. HTH, Chuck
[O] org-mode R using xtable produces strange output
I am using xtable to produce summary tables of linear models, specifying the output as latex. If I just run the code in R, I get the correct output. However, the latex output in the org document contains a lot of “|”s. I think this is because the header of the table contains some code to make “p > |t|”, where the vertical lines are to indicate “absolute value of t”. My guess is that when the output is written to the results section, org interprets the “|” signs as an org-table and tries to be helpful by adding more of them to make up the correct number of columns. If I switch off the latex output, and write the xtable to a small .tex file, using xtable.print and then include the file after the code block, the table appears correctly. I’m using emacs 25.2. Here’s an example: Best wishes, Brian xtableeg.org Description: Binary data