views:

95

answers:

2

EDIT:

Thx to suggestions from the mailing list I realized that the problem I got has nothing to do with Sweave or Latex. It´s some Mac OS X related issue. Whenever I run my script by selecting all and sending it to R it works.

When I use

source("myplainRcode.R") 

i get the error message stated below


finally I got sweave working together with ggplot2 on my Mac OS X. I invoke Sweave inside R with

Sweave("myfile.Rnw")

which creates the desired latex output. Now that the basic tests work, I try to source my real world file and it crashes at the following line:

 gl_bybranch = ddply(new_wans,.(period,Branchen),
 function(X)data.frame(Geschäftslage=mean(X$sentiment)))

I guess it has either to do with the ".(period...)" or the "ä" . Unfortunately I can't change these labels because they are also used in legends. So, somewhere in my code these ugly umlauts will appear. Is there a way to escape them in Sweave? I can't believe that this is problem since Sweave is written by a German who probably have second most umlaut characters (behind Turkey).

The error message I get is: invalid multibyte character in Parser on line 195

Thx for any ideas in advance!

A: 

YAY ! i got it. Sorry for the noise everybody. I switched all three files (.Rnw, mysource.R , invokeSweave.R) to UTF-8 it finally worked. So everybody who works with Komodo on a Mac make sure to change your default encoding to UTF-8 !

ran2
A: 

Thanks for the tip! Cheers

Mitch
de nada, Mitch ;)
ran2