Skip to content

Ein "R und backslash"-Problem

2 messages · Kerstin Andreas, Achim Zeileis

#
Hallo Uwe Ligges,

Ich habe Sie durch die Seite: 
https://stat.ethz.ch/pipermail/r-help/2000-May/005313.html
gefunden und br??uchte Ihre Hilfe.

Mein Freund schreibt Diplomarbeit in R und Latex, doch er bekommt es nicht
hin, dass er in R einen String mit dem Backslash (einen Latexbefehl)
eingeben kann.. R gibt nicht den \ zur??ck,
also am Beispiel: 
er m??chte: "$\pm$" eingeben, doch es kommt immer nur "$pm$" zur??ck von R.
Vielleicht haben Sie eine Idee, wie ich ihm helfen k??nnte.

Danke im Voraus,
Kerstin Andreas ^_^

--
#
Kerstin,

first of all, this is the R-help mailing list and not the private
address of:
Furthermore, the official language on the list is English.
As for your problem:
The backslash is the escape character in R (and in LaTeX), hence it has
to be escaped. Hence, try "$\\pm$". Also look at the difference of
cat()ing and print()ing such a character.

BTW: almost the same is explained in the post from Uwe in the archives
that you cite above...
Z