[R] Sweave - print \n ?
Abhijit Dasgupta
adasgupt at mail.jci.tju.edu
Fri Mar 28 22:37:39 CET 2008
you haven't escaped the \ for the \n, I think. Your line should be
cat("\\hline \\n"). You did escape the \ for hline, though.
Abhijit Dasgupta, Ph.D
Assistant Professor | Division of Biostatistics
Dept of Pharmacology and Experimental Therapeutics | Thomas Jefferson
University
1015 Chestnut St | Suite M100 | Philadelphia PA 19107
Ph: (215) 503-9201 | Fax: (215) 503-3804
adasgupt (at) mail (dot) jci (dot) tju (dot) edu
------------------------------------------------------------------------
The documents accompanying this transmission may contain confidential
health or business information. This information is intended for the use
of the individual or entity named above. If you have received this
information in error, please notify the sender immediately and arrange
for the return or destruction of these documents.
------------------------------------------------------------------------
Werner Wernersen wrote:
> Hi,
>
> this is probably quite stupid but I have no clue
> what's wrong. Let's say I write the function
> hline <- function() {
> cat("\\hline \n")
> }
> and call hline() from within a Sweave chunk. Why is
> there no carriage return after the \hline in the
> resulting tex file?
>
> if I call hline() hline() in the chunk, then I get
> \hline \hline
> in the tex code without a linebreak in between.
>
> Thanks for any hints,
> Werner
>
>
> E-Mails jetzt auf Ihrem Handy.
>
> ______________________________________________
> 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