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 actually running in R.
My next command <<>>= head(cabbages, n=10) @ is showing no recoding has taken place. Graham