[R] R table as integrable object for large Latex Documents - avoiding SWeave
Rainer M Krug
r.m.krug at gmail.com
Tue Aug 14 11:31:42 CEST 2012
-----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-----
More information about the R-help
mailing list