On 22/07/2010 8:19 AM, Bunny, lautloscrew.com wrote:
Dear all,
I use Sweave to create my reports. Unfortunately my script crashes whenever I my R code contains special characters like umlauts.
Is there a way to to escape special characters in Sweave... This is the line that crashes Sweave:
gl_bybranch = ddply(new_wans,.(period,Branchen), function(X)
data.frame(Geschäftslage=mean(X$sentiment)))
Unfortunately I can't just rename it, because I it´s displayed in the legend of
graphics later on.
Thx for any suggestions!
I think you need to give us some more details. What does "my script
crashes" mean? Does R fail, or does latex? What is the error message?
The likely problem is something to do with character encodings. By
default, latex usually only accepts plain ascii characters, nothing with
accents -- but modern versions can handle other encodings if you declare
them. So the solution may be as simple as declaring the encoding at the
top of your .Rnw file, e.g.
\usepackage[utf8]{inputenc}
if you are using the UTF-8 encoding.
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.