[R] How to make a Latex table using R

Luca Cerone luca.cerone at gmail.com
Thu May 15 16:09:47 CEST 2014


Hi Liao,
I think that the purpose of the package is actually to create the
latex code to insert into Latex documents.
If you want to see it displayed you have to compile it with latex; the
document you have sent says that that is a gallery to show
the different kind of tables you can create.


2014-05-15 15:46 GMT+02:00 Liao, Hongsheng <HLiao at odu.edu>:
> http://cran.r-project.org/web/packages/xtable/vignettes/xtableGallery.pdf
>
> I am trying to learn how to make a Latex table using R from the link above.  However, instead of a Latex table as showed in the link, the R codes from the link generate actual Latex codes as follows:
>
> % latex table generated in R 3.1.0 by xtable 1.7-3 package
> % Thu May 15 09:21:18 2014
> \begin{tabular}{rrlllr}
>   \hline
>  & grade & sex & disadvg & ethnicty & tlimth \\
>   \hline
> 1 & 6 & M & YES & HISPANIC & 43 \\
>   2 & 7 & M & NO & BLACK & 88 \\
>   3 & 5 & F & YES & HISPANIC & 34 \\
>   4 & 3 & M & YES & HISPANIC & 65 \\
>   5 & 8 & M & YES & WHITE & 75 \\
>   6 & 5 & M & NO & BLACK & 74 \\
>   7 & 8 & F & YES & HISPANIC & 72 \\
>   8 & 4 & M & YES & BLACK & 79 \\
>   9 & 6 & M & NO & WHITE & 88 \\
>   10 & 7 & M & YES & HISPANIC & 87 \\
>    \hline
> \end{tabular}
>
> I have TeX Live 2013 installed in my computer.  It doesn't help, either.  Should I need some kind of connection (software or codes) between R and Latex?  Thanks.
>
>
> Hongsheng (Hank) Liao, PhD.
> Lab Manager
> Center for Quantitative  Fisheries Ecology
> Old Dominion University
> 757-683-4571
>
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.



More information about the R-help mailing list