Skip to content
Back to formatted view

Raw Message

Message-ID: <20050524165515.55870bc8.Achim.Zeileis@wu-wien.ac.at>
Date: 2005-05-24T14:55:15Z
From: Achim Zeileis
Subject: Ein "R und backslash"-Problem
In-Reply-To: <4722.1116945882@www4.gmx.net>

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
>