[R] Ein "R und backslash"-Problem

Achim Zeileis Achim.Zeileis at wu-wien.ac.at
Tue May 24 16:55:15 CEST 2005


Kerstin,

first of all, this is the R-help mailing list and not the private
address of:

> Hallo Uwe Ligges,

Furthermore, the official language on the list is English.

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

As for your problem:

> 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.

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

> Danke im Voraus,
> Kerstin Andreas ^_^
> 
> --
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list