[R] Export to LaTeX

Mag. Ferri Leberl ferri.leberl at gmx.at
Fri Jul 14 10:23:13 CEST 2006


Dear Everybody!
I want to export data to LaTeX. As I want to employ the data as freely as 
possible I want to avoid the xtable-command and instead generate some List 
like

\MyOwnPrettyCommand{Adam}{Auer}{17}
\MyOwnPrettyCommand{Bertram}{Bauer}{14}
\MyOwnPrettyCommand{Christoph}{Huber}{75}
\MyOwnPrettyCommand{Damian}{Dorfer}{69}
\MyOwnPrettyCommand{Emanuel}{Eder}{43}

with \MyOwnPrittyCommand defined elsewhere.
As a pitty, if I make up about such a table in r, lets call it "A", and use 
the commands

sink("tabelle.tex")
A
sink("anderedatei")

tabelle.tex will look like this:

     [,1]                  [,2]        [,3] [,4]     [,5] [,6] [,7]
[1,] "MyOwnPrettyCommand{" "Adam"      "}{" "Auer"   "}{" "17" "}" 
[2,] "MyOwnPrettyCommand{" "Bertram"   "}{" "Bauer"  "}{" "14" "}" 
[3,] "MyOwnPrettyCommand{" "Christoph" "}{" "Huber"  "}{" "75" "}" 
[4,] "MyOwnPrettyCommand{" "Damian"    "}{" "Dorfer" "}{" "69" "}" 
[5,] "MyOwnPrettyCommand{" "Emanuel"   "}{" "Eder"   "}{" "43" "}" 

So my question is how to export the data properly, without line-indices, 
without quotes but WITH backslashes.
Thank you in advance.
Yours,
Mag. Ferri Leberl



More information about the R-help mailing list