[R] R-Latex question

Markus Jäntti mjantti at abo.fi
Tue Mar 11 19:10:31 CET 2008


On Tue, 2008-03-11 at 10:23 -0700, threshold wrote:
> cat("\hline \n");flush.console()

you need to double the backslashes, as in

cat("\\hline \n");flush.console()

as in

> cat("\\hline \n");flush.console()
\hline 

The warning when using just one kind of hints at what is going on:

> cat("\hline \n");flush.console()
hline 
Warning messages:
1: '\h' is an unrecognized escape in a character string 
2: unrecognized escape removed from "\hline \n" 

You may want to take a look the packages Hmisc and xtable, which both
have great facilities for doing latex output from all kinds of R
objects.

Regards,

markus
--
Markus Jantti
Abo Akademi University
mjantti at abo.fi
http://www.iki.fi/~mjantti



More information about the R-help mailing list