Re: Sweave code full of escape codes when printed?

2009-06-19 Thread Liviu Andronic
On 6/12/09, Graham Smith graham.sm...@myotis.co.uk wrote: Its now working. BUT the code still runs off the edge of the page and doesn't wrap with a continuation symbol. Anyone have any suggestions for fixing this one? \SweaveOpts{keep.source=TRUE} can help with this issue. See ?RweaveLatex

Re: Sweave code full of escape codes when printed?

2009-06-19 Thread Graham Smith
Liviu Andronic wrote: On 6/12/09, Graham Smith graham.sm...@myotis.co.uk wrote: Its now working. BUT the code still runs off the edge of the page and doesn't wrap with a continuation symbol. Anyone have any suggestions for fixing this one? \SweaveOpts{keep.source=TRUE} can help

Re: Sweave code full of escape codes when printed?

2009-06-19 Thread Liviu Andronic
On 6/12/09, Graham Smith graham.sm...@myotis.co.uk wrote: Its now working. BUT the code still runs off the edge of the page and doesn't wrap with a continuation symbol. Anyone have any suggestions for fixing this one? \SweaveOpts{keep.source=TRUE} can help with this issue. See ?RweaveLatex

Re: Sweave code full of escape codes when printed?

2009-06-19 Thread Graham Smith
Liviu Andronic wrote: On 6/12/09, Graham Smith graham.sm...@myotis.co.uk wrote: Its now working. BUT the code still runs off the edge of the page and doesn't wrap with a continuation symbol. Anyone have any suggestions for fixing this one? \SweaveOpts{keep.source=TRUE} can help

Re: Sweave code full of escape codes when printed?

2009-06-19 Thread Liviu Andronic
On 6/12/09, Graham Smith wrote: > Its now working. BUT the code still runs off the edge of the page and doesn't > wrap with a continuation symbol. Anyone have any suggestions for fixing this > one? > \SweaveOpts{keep.source=TRUE} can help with this issue. See

Re: Sweave code full of escape codes when printed?

2009-06-19 Thread Graham Smith
Liviu Andronic wrote: On 6/12/09, Graham Smith wrote: Its now working. BUT the code still runs off the edge of the page and doesn't wrap with a continuation symbol. Anyone have any suggestions for fixing this one? \SweaveOpts{keep.source=TRUE} can help

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Phillippe. I have already replied directly to you on this (in error) but to keep the help within the list I have repeated my answers here and added some information: If I convert the SWeave Scrap environment to Lyx Code, it compiles (as a bit of text) to PDF as expected, no strange

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
I wonder if its worth mentioning I am using a Mac, as it seems to be character code issue and maybe its something peculiar to the Mac. Graham

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Anders Ekberg
On 12 jun 2009, at 08.59, Graham Smith wrote: I wonder if its worth mentioning I am using a Mac, as it seems to be character code issue and maybe its something peculiar to the Mac. Graham You can always try to change the encoding, e.g. using TextWrangler and see if that changes anything.

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Anders Anders Ekberg wrote: You can always try to change the encoding, e.g. using TextWrangler and see if that changes anything. I'm sorry to say I don't how to do this. Do you mean my little bit of code giving me problems or do you mean the entire Lyx file. If its the former do I change the

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
I have now tried reversing the single quotes and double quotes as here: cabbages$Year-recode(cabbages$Year,'X2001'='2001';'X2002'='2002';'X2003'='2003'; etc This is now compiling verbatim (so no spurious slashes) when it appears in the PDF , but it is running off the edge of the page and not

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Anders Ekberg
On 12 jun 2009, at 11.06, Graham Smith wrote: Anders Anders Ekberg wrote: You can always try to change the encoding, e.g. using TextWrangler and see if that changes anything. I'm sorry to say I don't how to do this. Do you mean my little bit of code giving me problems or do you mean the

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Anders, Thanks again. I have now been sent some trial code that works with Lyx/SWeave/R on Linux, but it is doing nothing on my Mac (with a fresh file). So I suspect there may be a real issue here rather than it me. The strange syntax thing seems to have gone away now, so not sure what

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
With help from Anders and Jay, part of this problem seems to be solved. Some sample code from Jay, refused to run until the document settings were changed to use utf8 encoding. This worked for the sample code, but didn't help with my code. However, I notice that with my code in the latex

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Well this is a bit embarrassing , it seems I had two problems, one was that the recode command seems to need utf8 coding rather than the Lyx default (which is fine), plus I had typing error in the data set, which is not fine :-( I rewrote my code using the with command which allowed it to run,

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Phillippe. I have already replied directly to you on this (in error) but to keep the help within the list I have repeated my answers here and added some information: If I convert the SWeave Scrap environment to Lyx Code, it compiles (as a bit of text) to PDF as expected, no strange

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
I wonder if its worth mentioning I am using a Mac, as it seems to be character code issue and maybe its something peculiar to the Mac. Graham

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Anders Ekberg
On 12 jun 2009, at 08.59, Graham Smith wrote: I wonder if its worth mentioning I am using a Mac, as it seems to be character code issue and maybe its something peculiar to the Mac. Graham You can always try to change the encoding, e.g. using TextWrangler and see if that changes anything.

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Anders Anders Ekberg wrote: You can always try to change the encoding, e.g. using TextWrangler and see if that changes anything. I'm sorry to say I don't how to do this. Do you mean my little bit of code giving me problems or do you mean the entire Lyx file. If its the former do I change the

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
I have now tried reversing the single quotes and double quotes as here: cabbages$Year-recode(cabbages$Year,'X2001'='2001';'X2002'='2002';'X2003'='2003'; etc This is now compiling verbatim (so no spurious slashes) when it appears in the PDF , but it is running off the edge of the page and not

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Anders Ekberg
On 12 jun 2009, at 11.06, Graham Smith wrote: Anders Anders Ekberg wrote: You can always try to change the encoding, e.g. using TextWrangler and see if that changes anything. I'm sorry to say I don't how to do this. Do you mean my little bit of code giving me problems or do you mean the

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Anders, Thanks again. I have now been sent some trial code that works with Lyx/SWeave/R on Linux, but it is doing nothing on my Mac (with a fresh file). So I suspect there may be a real issue here rather than it me. The strange syntax thing seems to have gone away now, so not sure what

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
With help from Anders and Jay, part of this problem seems to be solved. Some sample code from Jay, refused to run until the document settings were changed to use utf8 encoding. This worked for the sample code, but didn't help with my code. However, I notice that with my code in the latex

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Well this is a bit embarrassing , it seems I had two problems, one was that the recode command seems to need utf8 coding rather than the Lyx default (which is fine), plus I had typing error in the data set, which is not fine :-( I rewrote my code using the with command which allowed it to run,

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Phillippe. I have already replied directly to you on this (in error) but to keep the help within the list I have repeated my answers here and added some information: If I convert the SWeave Scrap environment to Lyx Code, it compiles (as a bit of text) to PDF as expected, no strange

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
I wonder if its worth mentioning I am using a Mac, as it seems to be character code issue and maybe its something peculiar to the Mac. Graham

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Anders Ekberg
On 12 jun 2009, at 08.59, Graham Smith wrote: I wonder if its worth mentioning I am using a Mac, as it seems to be character code issue and maybe its something peculiar to the Mac. Graham You can always try to change the encoding, e.g. using TextWrangler and see if that changes anything.

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Anders Anders Ekberg wrote: You can always try to change the encoding, e.g. using TextWrangler and see if that changes anything. I'm sorry to say I don't how to do this. Do you mean my little bit of code giving me problems or do you mean the entire Lyx file. If its the former do I change the

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
I have now tried reversing the single quotes and double quotes as here: cabbages$Year<-recode(cabbages$Year,"'X2001'='2001';'X2002'='2002';'X2003'='2003'; etc This is now compiling verbatim (so no spurious slashes) when it appears in the PDF , but it is running off the edge of the page and

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Anders Ekberg
On 12 jun 2009, at 11.06, Graham Smith wrote: Anders Anders Ekberg wrote: You can always try to change the encoding, e.g. using TextWrangler and see if that changes anything. I'm sorry to say I don't how to do this. Do you mean my little bit of code giving me problems or do you mean the

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Anders, Thanks again. I have now been sent some trial code that works with Lyx/SWeave/R on Linux, but it is doing nothing on my Mac (with a fresh file). So I suspect there may be a real issue here rather than it me. The strange syntax thing seems to have gone away now, so not sure what

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
With help from Anders and Jay, part of this problem seems to be solved. Some sample code from Jay, refused to run until the document settings were changed to use utf8 encoding. This worked for the sample code, but didn't help with my code. However, I notice that with my code in the latex

Re: Sweave code full of escape codes when printed?

2009-06-12 Thread Graham Smith
Well this is a bit embarrassing , it seems I had two problems, one was that the recode command seems to need utf8 coding rather than the Lyx default (which is fine), plus I had typing error in the data set, which is not fine :-( I rewrote my code using the "with" command which allowed it to run,

Sweave code full of escape codes when printed?

2009-06-11 Thread Graham Smith
I've started using Sweave and having a problem The code in Lyx is library (car) cabbages$Year-recode(cabbages$Year,'X2001=2001;X2002=2002;X2003=2003; etc But its appearing in the PDF as cabbages$Year - recode(cabbages$Year, \X2001\=\2001\;\X2002\=\2002\;\X2003\=\2003\;\ etc And

Re: Sweave code full of escape codes when printed?

2009-06-11 Thread Philippe Grosjean
1) Have you placed your code in an ERT (Tex code)? 2) Did you enclose it with the required tags for noweb (INSIDE de ERT), i.e., = library (car) cabbages$Year-recode(cabbages$Year,'X2001=2001;X2002=2002;X2003=2003; etc @ 3) Did you run Sweave on the Noweb version produced? Best, Philippe

Sweave code full of escape codes when printed?

2009-06-11 Thread Graham Smith
I've started using Sweave and having a problem The code in Lyx is library (car) cabbages$Year-recode(cabbages$Year,'X2001=2001;X2002=2002;X2003=2003; etc But its appearing in the PDF as cabbages$Year - recode(cabbages$Year, \X2001\=\2001\;\X2002\=\2002\;\X2003\=\2003\;\ etc And

Re: Sweave code full of escape codes when printed?

2009-06-11 Thread Philippe Grosjean
1) Have you placed your code in an ERT (Tex code)? 2) Did you enclose it with the required tags for noweb (INSIDE de ERT), i.e., = library (car) cabbages$Year-recode(cabbages$Year,'X2001=2001;X2002=2002;X2003=2003; etc @ 3) Did you run Sweave on the Noweb version produced? Best, Philippe

Sweave code full of escape codes when printed?

2009-06-11 Thread Graham Smith
I've started using Sweave and having a problem The code in Lyx is library (car) cabbages$Year<-recode(cabbages$Year,'"X2001"="2001";"X2002"="2002";"X2003"="2003"; etc But its appearing in the PDF as > cabbages$Year <- recode(cabbages$Year,

Re: Sweave code full of escape codes when printed?

2009-06-11 Thread Philippe Grosjean
1) Have you placed your code in an ERT (Tex code)? 2) Did you enclose it with the required tags for noweb (INSIDE de ERT), i.e., <<>>= library (car) cabbages$Year<-recode(cabbages$Year,'"X2001"="2001";"X2002"="2002";"X2003"="2003"; etc @ 3) Did you run Sweave on the Noweb version produced?