Rau, Roland wrote:
> Hi,
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Rainer M Krug
>> Sent: Wednesday, December 13, 2006 8:47 AM
>> To: [email protected]
>> Subject: [R] exporting a table to latex
>
>> Is there another way of formating the values to three decimal digits?
>>
>> Or another way of exporting them to LaTeX?
>>
> I hope I did not oversee any emails concerning your question. Typically,
No, you didn't.
> I use the xtable-package. Please let me know if the following code is
> not doing what you hope for.
It's perfect. Doing exactly what I wanted it to do - Thanks a lot
Raienr
>
> Best,
> Roland
>
>
> mydata <- data.frame(Category=LETTERS[1:10], Percentage=runif(10))
>
> library(xtable)
>
> xtable(mydata, digits=c(0,0,3)) ### LaTeX format => default
> #### you can even create an HTML table
> print(xtable(mydata, digits=c(0,0,5)), type="HTML")
>
>
> ----------
> This mail has been sent through the MPI for Demographic Research. Should you
> receive a mail that is apparently from a MPI user without this text
> displayed, then the address has most likely been faked. If you are uncertain
> about the validity of this message, please check the mail header or ask your
> system administrator for assistance.
>
--
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)
Department of Conservation Ecology and Entomology
University of Stellenbosch
Matieland 7602
South Africa
Tel: +27 - (0)72 808 2975 (w)
Fax: +27 - (0)86 516 2782
Fax: +27 - (0)21 808 3304 (w)
Cell: +27 - (0)83 9479 042
email: [EMAIL PROTECTED]
[EMAIL PROTECTED]
______________________________________________
[email protected] 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.