clangkamp
2012-Aug-13 16:46 UTC
[R] R table as integrable object for large Latex Documents - avoiding SWeave
Hi, I am wondering whether some of you have a pointer to an alternative. I am currently writing my thesis in Latex (several documents), well grown over time, I am sure many of you are familiar with the situation. Likewise I am doing the quantitative analysis with R, and again a lot of lines of more or less wellwritten code. The outputs are graphs (which one can wonderfully integrate as PNG objects into Latex) and tables, where I am not sure. With Word / Powerpoint I always go via the CSV path, but CSV integration with the Latex Packages is really cumbersome. My main point is that there are some packages (xtable, pgfplotstable, ...) which sort of do integration, but they require a lot of command definitions, requiring a lot of time to get right and ultimately also providing much of a source for errors. Thus my question is whether you know of any alternative how to create pictures or CSV style objects that *easily* integrate into LaTeX, keep their format etc. Thanks Christian ----- Christian Langkamp christian.langkamp-at-gmxpro.de -- View this message in context: http://r.789695.n4.nabble.com/R-table-as-integrable-object-for-large-Latex-Documents-avoiding-SWeave-tp4640183.html Sent from the R help mailing list archive at Nabble.com.
Ista Zahn
2012-Aug-13 18:44 UTC
[R] R table as integrable object for large Latex Documents - avoiding SWeave
There is grid.table in the gridExtra package (http://code.google.com/p/gridextra/wiki/tableGrob), but for thesis tables I think you're better off trying to solve the difficulties you've been having with xtable. I can also recommend the latex function in the Hmisc package, which makes it easier to do things like specify row and column groups. Best, Ista On Mon, Aug 13, 2012 at 12:46 PM, clangkamp <christian.langkamp at gmxpro.de> wrote:> Hi, I am wondering whether some of you have a pointer to an alternative. > I am currently writing my thesis in Latex (several documents), well grown > over time, I am sure many of you are familiar with the situation. Likewise I > am doing the quantitative analysis with R, and again a lot of lines of more > or less wellwritten code. The outputs are graphs (which one can wonderfully > integrate as PNG objects into Latex) and tables, where I am not sure. With > Word / Powerpoint I always go via the CSV path, but CSV integration with the > Latex Packages is really cumbersome. > > My main point is that there are some packages (xtable, pgfplotstable, ...) > which sort of do integration, but they require a lot of command definitions, > requiring a lot of time to get right and ultimately also providing much of a > source for errors. Thus my question is whether you know of any alternative > how to create pictures or CSV style objects that *easily* integrate into > LaTeX, keep their format etc. > > Thanks > Christian > > > > ----- > Christian Langkamp > christian.langkamp-at-gmxpro.de > > -- > View this message in context: http://r.789695.n4.nabble.com/R-table-as-integrable-object-for-large-Latex-Documents-avoiding-SWeave-tp4640183.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Rainer M Krug
2012-Aug-14 09:31 UTC
[R] R table as integrable object for large Latex Documents - avoiding SWeave
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 13/08/12 18:46, clangkamp wrote:> Hi, I am wondering whether some of you have a pointer to an alternative. I am currently writing > my thesis in Latex (several documents), well grown over time, I am sure many of you are > familiar with the situation. Likewise I am doing the quantitative analysis with R, and again a > lot of lines of more or less wellwritten code. The outputs are graphs (which one can > wonderfully integrate as PNG objects into Latex) and tables, where I am not sure. With Word / > Powerpoint I always go via the CSV path, but CSV integration with the Latex Packages is really > cumbersome. > > My main point is that there are some packages (xtable, pgfplotstable, ...) which sort of do > integration, but they require a lot of command definitions, requiring a lot of time to get > right and ultimately also providing much of a source for errors. Thus my question is whether > you know of any alternative how to create pictures or CSV style objects that *easily* integrate > into LaTeX, keep their format etc.You effectively have two options: 1) process the table in R to create a LaTeX file which you can insert into your LaTeX document (see response from Ista), or 2) you can export your data as a csv file, and then process it in LaTeX. There are several packages, which can read csv files and format it as a table (e.g. http://mancoosi.org/~abate/latex-tables-csv-files, or http://texblog.org/2012/05/30/generate-latex-tables-from-csv-files-excel/) . Depending on how complicated your table is, if it is a longtable, or landscape, the one option might work better then the other, and it depends on your preferences. Some editors actually offer the option to import a csv file and convert it to LaTeX, gnumeric (and possibly LibreOffice) can export to LaTeX, but I would possibly use option 2) or 1) Cheers, Rainer> > Thanks Christian > > > > ----- Christian Langkamp christian.langkamp-at-gmxpro.de > > -- View this message in context: > http://r.789695.n4.nabble.com/R-table-as-integrable-object-for-large-Latex-Documents-avoiding-SWeave-tp4640183.html > >Sent from the R help mailing list archive at Nabble.com.>-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAqGv4ACgkQoYgNqgF2egpaEACfQtFoM+DWOtEuNv8pS8cE85iy 1pYAnix3ORL5dZBHVnnrR+3IbZOS5e1G =vuH6 -----END PGP SIGNATURE-----
Reasonably Related Threads
- Standard introductory presentation
- LaTeX consistent publication graphics from R and Comparison of GLE and R
- Subtract matrices within arrays along indices
- Re place Values within vector using Translation vector
- Adjusting the Axis in a histogram to the prespecified breaks