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 code window, the code
is highlighted between the $ signs at the start of the code
cabbages$Year<-recode(cabbages$Year,"'.....
I wonder if this suggests that the $ sign is being interpreted in some
odd way.
Graham
Graham Smith wrote:
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 obviously isn't working as printing out incorrectly.
Can anyone suggest what is happening here.
Many thanks,
Graham
--
Graham M Smith
graham.sm...@myotis.co.uk
Station Cottage, Station Road
Binegar, Somerset
BA3 4UQ