[R] How to get '\h' through print() or paste()?

Knut Suebert ksueber at uucp.goe.net
Sat Mar 20 22:05:06 CET 1999


[really hoping not to ask something the 1001th time]

I need single backslashes printed for generating TeX-code.

That works:

  > print("\begin{tabular}")
  [1] "\begin{tabular}"

But \h seems to be interprated in some way:

  > print('\hline')
  [1] "hline"

Hm, trying to mask the backslash:

  > print('\\hline')
  [1] "\\hline"
But I need "\hline"...

Is there a way without generating strange code in a temporary file for
"sed"ing it? It would be also nice to get rid of the leading number in
brackets for each line of output...

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list