Print backslash in R lines
GNU R 3.02
> bib <- "\cite"
Error: '\c' is an unrecognized escape in character string starting ""\c"
> bib <- "\\cite"
> print(bib)
[1] "\\cite"
> sprintf(bib)
[1] "\\cite"
>
how can i print a bib string variable with just one "\"?
(I tried everything imaginable and found that R treats "\\" as one character.)
I see that in many cases this is not a problem, since it is usually processed inside R, say, if the line should be used as text for the graph.
But I need to send it to LaTeX. So I really need to remove it.
I see what the cattrick is doing. If a cat could be made only to send its result to a string.
+4